Skip to content

Instantly share code, notes, and snippets.

@shmick
Created September 15, 2026 23:54
Show Gist options
  • Select an option

  • Save shmick/ece35c46140904408775aa6ea9c3e805 to your computer and use it in GitHub Desktop.

Select an option

Save shmick/ece35c46140904408775aa6ea9c3e805 to your computer and use it in GitHub Desktop.
Multi-arch docker build
name: Create and publish a Docker image
on:
workflow_dispatch: # Enables manual trigger
push:
branches:
- 'main'
paths:
- 'Dockerfile'
jobs:
docker:
permissions:
contents: read
packages: write
id-token: write
uses: docker/github-builder/.github/workflows/build.yml@v1
with:
platforms: linux/amd64,linux/arm64
output: image
push: true
meta-images: ghcr.io/${{ github.repository }}
meta-tags: |
type=raw,value=latest
type=sha,format=short
cache: true
secrets:
registry-auths: |
- registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment