Skip to content

Commit 0702b39

Browse files
committed
Log labels and annotations.
1 parent 5bf0a82 commit 0702b39

File tree

1 file changed

+33
-20
lines changed

1 file changed

+33
-20
lines changed

.github/workflows/development_image_release.yaml

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -71,23 +71,36 @@ jobs:
7171
uses: docker/metadata-action@v5
7272
with:
7373
images: ${{ vars.DOCKER_REGISTRY }}
74-
75-
- name: Build Image and Push
76-
uses: docker/build-push-action@v6
77-
with:
78-
platforms: linux/arm64,linux/amd64
79-
cache-from: type=registry,ref=${{vars.DOCKER_REGISTRY}}:latest
80-
context: .
81-
# This should not be taged as latest
82-
tags: ${{vars.DOCKER_REGISTRY}}:${{steps.get_version.outputs.SERVICE_VERSION}}
83-
file: ./service/Dockerfile
84-
push: true
85-
86-
# Add labels and annotations from metadata-action above.
87-
labels: ${{ steps.meta.outputs.labels }}
88-
annotations: ${{ steps.meta.outputs.annotations }}
89-
# Note: This includes build args in the published provenance.
90-
# Do not use this if secrets are passed in as args.
91-
provenance: mode=max
92-
# Pre-generate an SBOM file, which can be used for vulnerability scanning or listing licenses.
93-
sbom: true
74+
labels: |
75+
org.opencontainers.image.licenses=FSL-1.1-ALv2
76+
org.opencontainers.image.version=${{ steps.get_version.outputs.SERVICE_VERSION }}
77+
org.opencontainers.image.vendor=Journey Mobile, Inc
78+
annotations: |
79+
org.opencontainers.image.licenses=FSL-1.1-ALv2
80+
org.opencontainers.image.version=${{ steps.get_version.outputs.SERVICE_VERSION }}
81+
org.opencontainers.image.vendor=Journey Mobile, Inc
82+
- run: |
83+
echo "Labels:"
84+
echo "${{ steps.meta.outputs.labels }}"
85+
echo "Annotations:"
86+
echo "${{ steps.meta.outputs.annotations }}"
87+
88+
# - name: Build Image and Push
89+
# uses: docker/build-push-action@v6
90+
# with:
91+
# platforms: linux/arm64,linux/amd64
92+
# cache-from: type=registry,ref=${{vars.DOCKER_REGISTRY}}:latest
93+
# context: .
94+
# # This should not be taged as latest
95+
# tags: ${{vars.DOCKER_REGISTRY}}:${{steps.get_version.outputs.SERVICE_VERSION}}
96+
# file: ./service/Dockerfile
97+
# push: true
98+
99+
# # Add labels and annotations from metadata-action above.
100+
# labels: ${{ steps.meta.outputs.labels }}
101+
# annotations: ${{ steps.meta.outputs.annotations }}
102+
# # Note: This includes build args in the published provenance.
103+
# # Do not use this if secrets are passed in as args.
104+
# provenance: mode=max
105+
# # Pre-generate an SBOM file, which can be used for vulnerability scanning or listing licenses.
106+
# sbom: true

0 commit comments

Comments
 (0)