Add multi-platform build in workflow (#419)
All checks were successful
CI / checks (push) Successful in 52s

This commit is contained in:
Axel Fahy
2025-09-20 15:41:02 +02:00
committed by GitHub
parent eb78848601
commit 8875b98980

View File

@@ -2,7 +2,7 @@ name: Create and publish a Docker image
on: on:
push: push:
tags: tags:
- '*' - '*'
jobs: jobs:
@@ -15,28 +15,29 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Login to Github Container Registry - name: Login to Github Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Downcase repo - name: Downcase repo
run: | run: |
echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}" echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}"
- name: Build and push - name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: . context: .
platforms: linux/amd64,linux/arm64
push: true push: true
tags: | tags: |
ghcr.io/${{ env.REPO }}:${{ github.ref_name }} ghcr.io/${{ env.REPO }}:${{ github.ref_name }}