-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update centrally managed files (#107)
* update .github/workflows/promote.yaml * update .github/workflows/release.yaml --------- Co-authored-by: soleng-terraform[bot] <168111096+soleng-terraform[bot]@users.noreply.github.com> Co-authored-by: Samuel Allan <samuel.allan@canonical.com>
- Loading branch information
1 parent
c1f348d
commit bed9317
Showing
2 changed files
with
40 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,40 @@ | ||
name: Promote charm to other tracks and channels | ||
# This file is centrally managed as a template file in https://github.com/canonical/solutions-engineering-automation | ||
# To update the file: | ||
# - Edit it in the canonical/solutions-engineering-automation repository. | ||
# - Open a PR with the changes. | ||
# - When the PR merges, the soleng-terraform bot will open a PR to the target repositories with the changes. | ||
name: Promote charm to default track, standard risk levels. | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
destination-channel: | ||
description: 'Destination Channel, e.g. latest/candidate' | ||
required: true | ||
origin-channel: | ||
description: 'Origin Channel, e.g. latest/edge' | ||
channel-promotion: | ||
description: 'Channel Promotion, e.g. latest/edge -> latest/candidate' | ||
required: true | ||
type: choice | ||
options: | ||
- 'latest/edge -> latest/candidate' | ||
- 'latest/candidate -> latest/stable' | ||
|
||
jobs: | ||
promote-charm: | ||
name: Promote charm | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set channels | ||
id: set-channels | ||
run: | | ||
channel_promotion="${{ github.event.inputs.channel-promotion }}" | ||
origin=$(echo "$channel_promotion" | sed 's/\s*->.*//') | ||
destination=$(echo "$channel_promotion" | sed 's/.*->\s*//') | ||
echo "destination-channel=$destination" >> $GITHUB_OUTPUT | ||
echo "origin-channel=$origin" >> $GITHUB_OUTPUT | ||
- name: Release charm to channel | ||
# Note(rgildein): Since this charm uses the metadata defined in charmcraft.yaml, we need to use the pre-release version that includes https://github.com/canonical/charming-actions/pull/132. | ||
uses: canonical/charming-actions/release-charm@2.5.0-rc | ||
uses: canonical/charming-actions/release-charm@2.6.2 | ||
with: | ||
credentials: ${{ secrets.CHARMHUB_TOKEN }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
destination-channel: ${{ github.event.inputs.destination-channel }} | ||
origin-channel: ${{ github.event.inputs.origin-channel }} | ||
# Note(rgildein): The default is 20.04, but this charm has never been released for this base. | ||
base-channel: 22.04 | ||
destination-channel: ${{ steps.set-channels.outputs.destination-channel }} | ||
origin-channel: ${{ steps.set-channels.outputs.origin-channel }} | ||
charmcraft-channel: "2.x/stable" |
This file contains 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