Skip to content

Commit

Permalink
Use Docker BuildX for cross-platform image building
Browse files Browse the repository at this point in the history
  • Loading branch information
cry-inc committed Jan 4, 2025
1 parent 811bb08 commit c446a12
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/')
Expand Down

0 comments on commit c446a12

Please sign in to comment.