diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 5011cf7a..0ce5d866 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -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 @@ -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 @@ -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 @@ -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