Skip to content

Commit

Permalink
Build arm64 on GHA using QEMU
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Apr 17, 2024
1 parent 9f1a5ad commit dd51bf5
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
- name: Checkout Repo ⚡️
uses: actions/checkout@v4

#- name: Set up QEMU
#uses: docker/setup-qemu-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -50,7 +50,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Generate tags for images on ghcr.io
- name: Generate tags for images on ghcr.io 🏷️
id: tags_template
uses: docker/metadata-action@v4
with:
Expand All @@ -68,12 +68,11 @@ jobs:
.github/workflows/merge-bake-template-target.sh ${BAKE_TEMPLATE_FILE} \
| tee docker-bake-template-meta.json
- name: Build image
- name: Build images and upload to ghcr.io 📤
id: build
uses: docker/bake-action@v4
with:
push: true
load: false
# Using provenance to disable default attestation so it will build only desired images:
# https://github.com/orgs/community/discussions/45969
provenance: false
Expand All @@ -82,6 +81,21 @@ jobs:
build.json
docker-bake-template-meta.json
- name: Build images for ARM64 🍎
id: build-arm64
uses: docker/bake-action@v4
with:
push: true
# Using provenance to disable default attestation so it will build only desired images:
# https://github.com/orgs/community/discussions/45969
provenance: false
set: |
*.platform=linux/arm64
files: |
docker-bake.hcl
build.json
docker-bake-template-meta.json
- name: Set output variables
id: bake_metadata
run: |
Expand Down

0 comments on commit dd51bf5

Please sign in to comment.