CI for 812b1529f25738a52d1e8daa7984dc0ad47cde0e on 27/merge #38
Workflow file for this run
This file contains hidden or 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
| name: CI | |
| # When pushing to the "main" branch, we: | |
| # * build the rock image | |
| # * publish the image | |
| # * scan the image and upload the artifacts to the repository | |
| run-name: CI for ${{ github.sha }} on ${{ github.ref_name }} | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - "main" | |
| - "release-**" | |
| tags: | |
| - "v**" | |
| paths: | |
| - "rockcraft.yaml" | |
| - ".github/workflows/**.yaml" | |
| pull_request: | |
| branches: | |
| - "*" | |
| jobs: | |
| build: | |
| uses: canonical/identity-team/.github/workflows/_rock-build.yaml@f18247249f506f3c9210b86e43a2c4dd063088c5 # v1.8.7 | |
| with: | |
| structure-tests-enabled: true | |
| gh-publish: | |
| if: ${{ (github.ref == 'refs/heads/main') || (github.ref_type == 'tag') }} | |
| needs: build | |
| uses: canonical/identity-team/.github/workflows/_rock-gh-publish.yaml@f18247249f506f3c9210b86e43a2c4dd063088c5 # v1.8.7 | |
| with: | |
| rock: ${{ needs.build.outputs.rock }} | |
| oci-publish: | |
| # only release to oci-factory in case of release | |
| if: github.ref_type == 'tag' | |
| needs: build | |
| uses: canonical/identity-team/.github/workflows/_rock-oci-publish.yaml@f18247249f506f3c9210b86e43a2c4dd063088c5 # v1.8.7 | |
| with: | |
| edge-release: false | |
| eol-stable-release: "3 month" | |
| secrets: | |
| PAT_TOKEN: ${{ secrets.PAT_TOKEN }} | |
| scan: | |
| if: ${{ (github.ref == 'refs/heads/main') || (github.ref_type == 'tag') }} | |
| needs: gh-publish | |
| uses: canonical/identity-team/.github/workflows/_rock-scan.yaml@f18247249f506f3c9210b86e43a2c4dd063088c5 # v1.8.7 | |
| with: | |
| image: ${{ needs.gh-publish.outputs.image }} |