From a8e5c3ace508df687562c5c994a63126744aeb4c Mon Sep 17 00:00:00 2001 From: Stamatis Katsaounis Date: Wed, 3 Apr 2024 11:12:23 +0300 Subject: [PATCH] feat: introduce a complete set of CI actions --- .github/workflows/promote.yaml | 27 +++++++++++++++++++++++++++ .github/workflows/release.yaml | 21 +++++++++++++++++++++ .github/workflows/update-libs.yaml | 22 ++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 .github/workflows/promote.yaml create mode 100644 .github/workflows/release.yaml create mode 100644 .github/workflows/update-libs.yaml diff --git a/.github/workflows/promote.yaml b/.github/workflows/promote.yaml new file mode 100644 index 0000000..951f4b1 --- /dev/null +++ b/.github/workflows/promote.yaml @@ -0,0 +1,27 @@ +name: Promote Charm + +on: + workflow_dispatch: + inputs: + charm: + type: choice + description: Charm to promote + options: + - maas-region + - maas-agent + promotion: + type: choice + description: Channel to promote from + options: + - edge -> beta + - beta -> candidate + - candidate -> stable + +jobs: + promote: + name: Promote + uses: canonical/observability/.github/workflows/charm-promote.yaml@main + with: + charm-path: ${{ github.event.inputs.charm }} + promotion: ${{ github.event.inputs.promotion }} + secrets: inherit diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..166936a --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,21 @@ +name: Release Charms to Edge and Publish Libraries + +on: + push: + branches: + - main + +jobs: + release-region: + uses: canonical/observability/.github/workflows/charm-release.yaml@main + secrets: inherit + with: + charm-path: maas-region + provider: lxd + + release-agent: + uses: canonical/observability/.github/workflows/charm-release.yaml@main + secrets: inherit + with: + charm-path: maas-agent + provider: lxd diff --git a/.github/workflows/update-libs.yaml b/.github/workflows/update-libs.yaml new file mode 100644 index 0000000..d30d56d --- /dev/null +++ b/.github/workflows/update-libs.yaml @@ -0,0 +1,22 @@ +name: Auto-update Charm Libraries +on: + # Manual trigger + workflow_dispatch: + # Check regularly the upstream every four hours + schedule: + - cron: "0 0,4,8,12,16,20 * * *" + +jobs: + update-lib-region: + name: Check libraries + uses: canonical/observability/.github/workflows/charm-update-libs.yaml@main + secrets: inherit + with: + charm-path: maas-region + + update-lib-agent: + name: Check libraries + uses: canonical/observability/.github/workflows/charm-update-libs.yaml@main + secrets: inherit + with: + charm-path: maas-agent