Skip to content

Commit

Permalink
CI: attach resource to channel once uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
M7mdisk committed Aug 22, 2024
1 parent e6d268a commit 4eaf657
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/publish_charm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,11 @@ jobs:
run: |
sudo snap install charmcraft --classic --channel=latest/edge
charmcraft upload-resource charmhub-io flask-app-image --image=`docker images --format "{{.ID}}" | head -n 1` --verbosity=trace
- name: Attach resource to charm
env:
CHARMCRAFT_AUTH: ${{ secrets.CHARMHUB_TOKEN }}
run: |
revision_number=$(charmcraft resource-revisions charmhub-io flask-app-image | awk 'NR==2 {print $1}')
echo "Latest revision number: $revision_number"
charmcraft release charmhub-io --channel=beta --resource flask-app-image:$revision_number

0 comments on commit 4eaf657

Please sign in to comment.