File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -80,12 +80,14 @@ jobs:
8080 context : .
8181 # This should not be taged as latest
8282 tags : ${{vars.DOCKER_REGISTRY}}:${{steps.get_version.outputs.SERVICE_VERSION}}
83- # Add labels from metadata-action above.
83+ file : ./service/Dockerfile
84+ push : true
85+
86+ # Add labels and annotations from metadata-action above.
8487 labels : ${{ steps.meta.outputs.labels }}
8588 annotations : ${{ steps.meta.outputs.annotations }}
86- push : true
8789 # Note: This includes build args in the published provenance.
8890 # Do not use this if secrets are passed in as args.
8991 provenance : mode=max
92+ # Pre-generate an SBOM file, which can be used for vulnerability scanning or listing licenses.
9093 sbom : true
91- file : ./service/Dockerfile
Original file line number Diff line number Diff line change @@ -112,6 +112,11 @@ jobs:
112112 id : get_version
113113 run : echo "SERVICE_VERSION=$(node -p "require('./service/package.json').version")" >> $GITHUB_OUTPUT
114114
115+ - name : Extract metadata for the image
116+ uses : docker/metadata-action@v5
117+ with :
118+ images : ${{ vars.DOCKER_REGISTRY }}
119+
115120 - name : Build Image and Push
116121 uses : docker/build-push-action@v5
117122 with :
@@ -122,7 +127,16 @@ jobs:
122127 push : true
123128 file : ./service/Dockerfile
124129
125- # # Updates the README section on the DockerHub page
130+ # Add labels and annotations from metadata-action above.
131+ labels : ${{ steps.meta.outputs.labels }}
132+ annotations : ${{ steps.meta.outputs.annotations }}
133+ # Note: This includes build args in the published provenance.
134+ # Do not use this if secrets are passed in as args.
135+ provenance : mode=max
136+ # Pre-generate an SBOM file, which can be used for vulnerability scanning or listing licenses.
137+ sbom : true
138+
139+ # Updates the README section on the DockerHub page
126140 - name : Update repo description
127141 # Note that this 3rd party extention is recommended in the DockerHub docs:
128142 # https://docs.docker.com/build/ci/github-actions/update-dockerhub-desc/
You can’t perform that action at this time.
0 commit comments