Skip to content

Commit

Permalink
feat: Publish charms and snaps to branch on pull request (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Beierl authored Mar 22, 2024
1 parent e7661f4 commit 1160673
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ on:
jobs:
check-libraries:
uses: canonical/sdcore-github-workflows/.github/workflows/check-libraries.yaml@main
secrets:
CHARMCRAFT_AUTH: ${{ secrets.CHARMCRAFT_AUTH }}
secrets: inherit

lint-report:
uses: canonical/sdcore-github-workflows/.github/workflows/lint-report.yaml@main
Expand Down Expand Up @@ -43,8 +42,22 @@ jobs:
with:
charm-file-name: "sdcore-upf-k8s_ubuntu-22.04-amd64.charm"
track-name: 1.3
secrets:
CHARMCRAFT_AUTH: ${{ secrets.CHARMCRAFT_AUTH }}
secrets: inherit

publish-charm-on-push:
name: Publish Developer Charm To Branch
needs:
- lint-report
- static-analysis
- unit-tests-with-coverage
- integration-test
if: ${{ (github.ref_name != 'main') && (github.event_name == 'push') }}
uses: canonical/sdcore-github-workflows/.github/workflows/publish-charm.yaml@main
with:
branch-name: /${{ github.ref_name }}
charm-file-name: "sdcore-upf-k8s_ubuntu-22.04-amd64.charm"
track-name: 1.3
secrets: inherit

fiveg-n3-lib-needs-publishing:
runs-on: ubuntu-22.04
Expand All @@ -68,8 +81,7 @@ jobs:
uses: canonical/sdcore-github-workflows/.github/workflows/publish-lib.yaml@main
with:
lib-name: "charms.sdcore_upf_k8s.v0.fiveg_n3"
secrets:
CHARMCRAFT_AUTH: ${{ secrets.CHARMCRAFT_AUTH }}
secrets: inherit

fiveg-n4-lib-needs-publishing:
runs-on: ubuntu-22.04
Expand All @@ -93,5 +105,4 @@ jobs:
uses: canonical/sdcore-github-workflows/.github/workflows/publish-lib.yaml@main
with:
lib-name: "charms.sdcore_upf_k8s.v0.fiveg_n4"
secrets:
CHARMCRAFT_AUTH: ${{ secrets.CHARMCRAFT_AUTH }}
secrets: inherit

0 comments on commit 1160673

Please sign in to comment.