Skip to content

Commit

Permalink
fix: Uses charming actions workflow to publish the charm (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
gruyaume committed Nov 20, 2023
1 parent 11981eb commit c48de82
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: CI

on:
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]

jobs:
lint-report:
Expand Down Expand Up @@ -52,7 +56,7 @@ jobs:
run: tox -e integration
- name: Archive Tested Charm
uses: actions/upload-artifact@v3
if: ${{ github.ref_name == 'main' }}
if: ${{ github.event_name == 'push' }}
with:
name: tested-charm
path: .tox/**/httpreq-acme-operator_ubuntu-22.04-amd64.charm
Expand All @@ -78,7 +82,7 @@ jobs:
- unit-tests-with-coverage
- integration-test
runs-on: ubuntu-22.04
if: ${{ github.ref_name == 'main' }}
if: ${{ github.event_name == 'push' }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -94,6 +98,8 @@ jobs:
uses: canonical/charming-actions/[email protected]
id: channel
- name: Upload charm to Charmhub
env:
CHARMCRAFT_AUTH: "${{ secrets.CHARMHUB_TOKEN }}"
run: charmcraft upload ./httpreq-acme-operator_ubuntu-22.04-amd64.charm --release ${{ steps.channel.outputs.name }}
uses: canonical/charming-actions/[email protected]
with:
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
channel: "${{ steps.channel.outputs.name }}"

0 comments on commit c48de82

Please sign in to comment.