File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -36,17 +36,25 @@ jobs:
3636 password : ${{ secrets.GITHUB_TOKEN }} # works if org allows Actions to publish packages
3737
3838 - name : Set IMAGE env
39- run : echo "IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}/yaci" >> "$GITHUB_ENV"
39+ run : echo "IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/yaci" >> "$GITHUB_ENV"
40+
41+ - name : Extract metadata (tags, labels) for Docker
42+ id : meta
43+ uses : docker/metadata-action@v5
44+ with :
45+ images : ${{ env.IMAGE }}
46+ tags : |
47+ type=raw,value=latest
48+ type=sha,format=long # equals ${{ github.sha }}
4049
4150 - name : Build & Push
4251 id : docker_build
4352 uses : docker/build-push-action@v6
4453 with :
4554 context : .
4655 push : true
47- tags : |
48- ${{ env.IMAGE }}:latest
49- ${{ env.IMAGE }}:${{ github.sha }}
56+ tags : ${{ steps.meta.outputs.tags }}
57+ labels : ${{ steps.meta.outputs.labels }}
5058 cache-from : type=gha
5159 cache-to : type=gha,mode=max
5260 provenance : mode=max
5967 - name : Generate artifact attestation
6068 uses : actions/attest-build-provenance@v2
6169 with :
62- subject-name : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
70+ subject-name : ${{ env.IMAGE }}
6371 subject-digest : ${{ steps.docker_build.outputs.digest }}
6472 push-to-registry : true # publish as an OCI referrer alongside the image
You can’t perform that action at this time.
0 commit comments