Skip to content

Commit 9dab273

Browse files
committed
override image.version
1 parent a14be75 commit 9dab273

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/build_image.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ jobs:
5050
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
5151
with:
5252
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
53+
labels: |
54+
org.opencontainers.image.version=${{ env.OCD_IMAGE_VERSION }}
5355
tags: |
54-
type=semver,pattern={{version}},prefix=image-
55-
#type=semver,pattern=${{ env.OCD_IMAGE_VERSION }}
56+
type=semver,pattern=${{ env.OCD_IMAGE_VERSION }}
5657
5758
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
5859
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
@@ -63,8 +64,10 @@ jobs:
6364
with:
6465
context: .
6566
push: true
66-
tags: ${{ steps.meta.outputs.tags }}
67-
labels: ${{ steps.meta.outputs.labels }}
67+
#tags: ${{ steps.meta.outputs.tags }}
68+
tags: |
69+
- ${{ env.OCD_IMAGE_VERSION }}
70+
#labels: ${{ steps.meta.outputs.labels }}
6871

6972
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
7073
- name: Generate artifact attestation

0 commit comments

Comments
 (0)