This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2026 Canonical Ltd. | ||
| # See LICENSE file for licensing details. | ||
| name: Automatic promotion of bundle revisions | ||
| on: | ||
| pull_request: | ||
| workflow_dispatch: | ||
| inputs: | ||
| from-risk: | ||
| description: "Risk level to fetch revisions from" | ||
| required: true | ||
| default: edge | ||
| type: choice | ||
| options: | ||
| - edge | ||
| - beta | ||
| - candidate | ||
| - stable | ||
| to-risk: | ||
| description: "Risk level to promote revisions to" | ||
| required: true | ||
| default: candidate | ||
| type: choice | ||
| options: | ||
| - edge | ||
| - beta | ||
| - candidate | ||
| - stable | ||
| gate: | ||
| description: "Workflow to gate promotion on" | ||
| required: true | ||
| default: ci-tests-single-kyuubi | ||
| type: choice | ||
| options: | ||
| - ci-tests-single-kyuubi | ||
| - ci-tests-minimal | ||
| dry-run: | ||
| description: "Whether to run promotion in dry-run mode" | ||
| required: true | ||
| default: true | ||
| type: boolean | ||
| jobs: | ||
| generate-revisions: | ||
| name: Generate tfvars revisions | ||
| uses: ./.github/workflows/generate-charm-revisions.yaml | ||
| secrets: inherit | ||
| with: | ||
| risk: ${{ inputs.from-risk }} | ||
| tests: | ||
| name: Run CI tests on a PR | ||
| needs: generate-revisions | ||
| uses: ./.github/workflows/${{ inputs.gate }}.yaml | ||
| secrets: inherit | ||
| with: | ||
| tfvars-file: ${{ needs.generate-revisions.outputs.tfvars-artifact-name }} | ||
| promotion: | ||
| name: Promotion | ||
| needs: | ||
| - generate-revisions | ||
| - tests | ||
| uses: ./.github/workflows/promote-charm-revisions.yaml | ||
| secrets: inherit | ||
| with: | ||
| tfvars-artifact-name: ${{ needs.generate-revisions.outputs.tfvars-artifact-name }} | ||
| risk: ${{ inputs.to-risk }} | ||
| dry-run: ${{ inputs.dry-run }} | ||