Skip to content

Commit d5fe3ef

Browse files
committed
Update production image release action.
1 parent 30773c8 commit d5fe3ef

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

.github/workflows/development_image_release.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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

.github/workflows/packages_release.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff 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/

0 commit comments

Comments
 (0)