Skip to content

Commit 6f30a44

Browse files
committed
Push image without tags
1 parent 0365ac2 commit 6f30a44

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

.github/workflows/ci-pipeline.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ jobs:
107107
username: ${{ github.actor }}
108108
password: ${{ secrets.GITHUB_TOKEN }}
109109

110-
# Extract metadata (tags, labels) for Docker
111-
# https://github.com/docker/metadata-action
110+
# We extract metadata without tags for single image
112111
- name: Extract Docker metadata
113112
id: meta
114113
uses: docker/[email protected]
@@ -117,12 +116,8 @@ jobs:
117116
# <registry/<owner>/<repo_name>/<repo_name>-<target>
118117
images: |
119118
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/${{ env.IMAGE_NAME }}-${{ matrix.docker_target }}
120-
# generate Docker tags based on the following events/attributes
121-
tags: |
122-
type=sha,suffix=-${{ env.PLATFORM_PAIR }}
123119
124-
# Build and push Docker image with Buildx by digest
125-
# https://github.com/docker/build-push-action
120+
# This build an image WITHOUT tags and outputs the digests, so that we can aggragate them later
126121
- name: Build and push production image
127122
id: build-and-push
128123
uses: docker/[email protected]
@@ -131,7 +126,7 @@ jobs:
131126
target: ${{ matrix.docker_target }}
132127
platforms: ${{ matrix.arch.platform }}
133128
outputs: type=image,push-by-digest=true,name-canonical=true,push=true
134-
tags: ${{ steps.meta.outputs.tags }}
129+
tags: ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/${{ env.IMAGE_NAME }}-${{ matrix.docker_target }}
135130
labels: ${{ steps.meta.outputs.labels }}
136131
cache-from: type=gha
137132
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)