From c446a12bf543989afb155a1074f57a55097df6d9 Mon Sep 17 00:00:00 2001 From: cry-inc Date: Sat, 4 Jan 2025 12:44:28 +0100 Subject: [PATCH] Use Docker BuildX for cross-platform image building --- .github/workflows/ci.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1bee2ad..bc3978c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -140,6 +140,22 @@ jobs: with: name: docker-linux-x86_64 path: dmarc-report-viewer.tar + docker_linux_buildx: + name: Docker (Linux, x86-64, aarch64) + runs-on: ubuntu-24.04 + permissions: + contents: read + packages: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build Docker Images + run: | + echo ${{secrets.GITHUB_TOKEN}} | docker login ghcr.io -u ${{github.actor}} --password-stdin + docker builder create --name builder --driver docker-container --bootstrap + docker buildx build --builder builder --platform=linux/amd64,linux/arm64 --push --build-arg GITHUB_SHA --build-arg GITHUB_REF_NAME --pull --tag ghcr.io/${{github.actor}}/dmarc-report-viewer:buildx . + - name: Test Docker Image + run: docker run --rm ghcr.io/${{github.actor}}/dmarc-report-viewer:buildx ./dmarc-report-viewer --help release: name: Release if: startsWith(github.ref, 'refs/tags/')