-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Provide default track and risk levels as dropdown in promote.yaml (planned but not in scope for this PR) - For some projects need to release to different track/risk-levels, we provide another customized file instead using standard one.
- Loading branch information
Showing
2 changed files
with
34 additions
and
16 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,25 +1,34 @@ | ||
name: Promote charm to other tracks and channels | ||
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 | ||
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 | ||
uses: canonical/charming-actions/[email protected] | ||
with: | ||
credentials: $${{ secrets.CHARMHUB_TOKEN }} | ||
github-token: $${{ secrets.GITHUB_TOKEN }} | ||
destination-channel: $${{ github.event.inputs.destination-channel }} | ||
origin-channel: $${{ github.event.inputs.origin-channel }} | ||
destination-channel: $${{ steps.set-channels.outputs.destination-channel }} | ||
origin-channel: $${{ steps.set-channels.outputs.origin-channel }} |
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