File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1414jobs :
1515 build-and-push :
1616 runs-on : ubuntu-latest
17+ permissions :
18+ id-token : write
1719 steps :
1820 - uses : actions/checkout@v5
1921 - name : Set up QEMU
2325 - name : Set up Docker Buildx
2426 id : buildx
2527 uses : docker/setup-buildx-action@v3
28+ - name : Set up cosign
29+ if : ${{ github.event_name != 'pull_request' }}
30+ uses : sigstore/cosign-installer@v3
2631 - name : login to Docker Hub
2732 if : ${{ github.event_name != 'pull_request' }}
2833 uses : docker/login-action@v3
3843 password : ${{ secrets.QUAYIO_PASSWORD }}
3944 - name : Build and push
4045 uses : docker/bake-action@v6
46+ id : bake
4147 with :
4248 builder : ${{ steps.buildx.outputs.name }}
4349 source : .
4854 env :
4955 GIT_COMMIT : ${{ github.sha }}
5056 CACHE : true
57+ - name : Sign images
58+ if : ${{ github.event_name != 'pull_request' }}
59+ run : |
60+ jq '.[] | select(type=="object") | select(."containerimage.digest") | ."containerimage.digest" as $DIGEST | ."image.name" | split(":")[0] | "\(.)@\($DIGEST)"' -r <<<'${{ steps.bake.outputs.metadata }}' \
61+ | xargs --no-run-if-emtpy cosign sign --yes
You can’t perform that action at this time.
0 commit comments