Skip to content

Commit 579d2da

Browse files
authored
1.0.1
Add multi-arch image via ghcr.
1 parent a80aa42 commit 579d2da

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
name: Docker
22

3-
# This workflow uses actions that are not certified by GitHub.
4-
# They are provided by a third-party and are governed by
5-
# separate terms of service, privacy policy, and support
6-
# documentation.
7-
83
on:
94
schedule:
105
- cron: '25 8 * * *'
@@ -49,13 +44,19 @@ jobs:
4944
# multi-platform images and export cache
5045
# https://github.com/docker/setup-buildx-action
5146
- name: Set up Docker Buildx
52-
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
47+
uses: docker/setup-buildx-action@v3
48+
49+
# Create a new builder instance
50+
- name: Create builder
51+
run: |
52+
docker buildx create --use --name mybuilder
53+
docker buildx inspect mybuilder --bootstrap
5354
5455
# Login against a Docker registry except on PR
5556
# https://github.com/docker/login-action
5657
- name: Log into registry ${{ env.REGISTRY }}
5758
if: github.event_name != 'pull_request'
58-
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
59+
uses: docker/login-action@v3
5960
with:
6061
registry: ${{ env.REGISTRY }}
6162
username: ${{ github.actor }}
@@ -65,22 +66,23 @@ jobs:
6566
# https://github.com/docker/metadata-action
6667
- name: Extract Docker metadata
6768
id: meta
68-
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
69+
uses: docker/metadata-action@v5
6970
with:
7071
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
7172

7273
# Build and push Docker image with Buildx (don't push on PR)
7374
# https://github.com/docker/build-push-action
7475
- name: Build and push Docker image
7576
id: build-and-push
76-
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
77+
uses: docker/build-push-action@v5
7778
with:
7879
context: .
7980
push: ${{ github.event_name != 'pull_request' }}
8081
tags: ${{ steps.meta.outputs.tags }}
8182
labels: ${{ steps.meta.outputs.labels }}
8283
cache-from: type=gha
8384
cache-to: type=gha,mode=max
85+
platforms: linux/amd64,linux/arm64
8486

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

0 commit comments

Comments
 (0)