Skip to content

Commit 468fb4d

Browse files
committed
try update
1 parent 411a6c8 commit 468fb4d

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

.github/workflows/docker-push-ghcr.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,23 @@ jobs:
5252
with:
5353
cosign-release: 'v1.13.1'
5454

55+
# Extract metadata (tags, labels) for Docker
56+
# https://github.com/docker/metadata-action
57+
- name: Extract Docker metadata
58+
id: meta
59+
uses: docker/metadata-action@v4
60+
with:
61+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
62+
5563
- name: Set up QEMU
5664
uses: docker/setup-qemu-action@v2
5765
with:
5866
platforms: linux/amd64,linux/arm64
5967

6068
- name: Setup Docker buildx
6169
uses: docker/setup-buildx-action@v2
70+
with:
71+
platforms: linux/amd64,linux/arm64
6272

6373
# Login against a Docker registry except on PR
6474
# https://github.com/docker/login-action
@@ -70,27 +80,20 @@ jobs:
7080
username: ${{ github.actor }}
7181
password: ${{ secrets.GITHUB_TOKEN }}
7282

73-
# Extract metadata (tags, labels) for Docker
74-
# https://github.com/docker/metadata-action
75-
- name: Extract Docker metadata
76-
id: meta
77-
uses: docker/metadata-action@v4
78-
with:
79-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
80-
8183
# Build and push Docker image with Buildx (don't push on PR)
8284
# https://github.com/docker/build-push-action
8385
- name: Build and push Docker image
8486
id: build-and-push
8587
uses: docker/build-push-action@v4
8688
with:
8789
context: .
90+
builder: ${{ steps.buildx.outputs.name }}
91+
platforms: ${{ steps.buildx.outputs.platforms }}
8892
push: ${{ github.event_name != 'pull_request' }}
8993
tags: ${{ steps.meta.outputs.tags }}
9094
labels: ${{ steps.meta.outputs.labels }}
9195
cache-from: type=gha
9296
cache-to: type=gha,mode=max
93-
platforms: linux/amd64,linux/arm64
9497

9598
# Sign the resulting Docker image digest except on PRs.
9699
# This will only write to the public Rekor transparency log when the Docker

0 commit comments

Comments
 (0)