ci: fix the oci-factory rock publishing #394
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 | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| paths: | |
| - "rockcraft.yaml" | |
| - ".github/workflows/**.yaml" | |
| pull_request: | |
| branches: | |
| - "*" | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| uses: canonical/identity-team/.github/workflows/_rock-build.yaml@2a4ae518f9c792dcdf14d05f8d86e3d72e160d96 # v1.9.0 | |
| with: | |
| structure-tests-enabled: true | |
| gh-publish: | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| needs: build | |
| uses: canonical/identity-team/.github/workflows/_rock-gh-publish.yaml@2a4ae518f9c792dcdf14d05f8d86e3d72e160d96 # v1.9.0 | |
| with: | |
| rock: ${{ needs.build.outputs.rock }} | |
| oci-publish: | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| needs: build | |
| uses: canonical/identity-team/.github/workflows/_rock-oci-publish.yaml@2a4ae518f9c792dcdf14d05f8d86e3d72e160d96 # v1.9.0 | |
| with: | |
| edge-release: false | |
| eol-stable-release: "3 month" | |
| secrets: | |
| PAT_TOKEN: ${{ secrets.PAT_TOKEN }} | |
| scan: | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| needs: gh-publish | |
| uses: canonical/identity-team/.github/workflows/_rock-scan.yaml@2a4ae518f9c792dcdf14d05f8d86e3d72e160d96 # v1.9.0 | |
| with: | |
| image: ${{ needs.gh-publish.outputs.image }} |