Skip to content

Commit

Permalink
Add linux/arm64 platforms to image builds
Browse files Browse the repository at this point in the history
  • Loading branch information
timower committed Sep 28, 2023
1 parent faa26ae commit e30a06e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
registry: ghcr.io
username: matteodelabre
password: ${{ secrets.CR_PAT }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build and publish images
run: |
./scripts/build -p .
2 changes: 2 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
steps:
- name: Checkout the Git repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build images
run: |
./scripts/build .
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
registry: ghcr.io
username: matteodelabre
password: ${{ secrets.CR_PAT }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build and publish images
run: |
version="$(echo "${{ github.ref }}" | cut -d / -f 3)"
Expand Down
2 changes: 2 additions & 0 deletions scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ version="$2"
# Enable BuildKit for better cache behavior
# See <https://docs.docker.com/engine/reference/builder/#buildkit>
export DOCKER_BUILDKIT=1
docker buildx create --use

docker-build() {
from="$(image-name "$1" "$version")"
Expand All @@ -57,6 +58,7 @@ docker-build() {
--build-arg BUILDKIT_INLINE_CACHE=1 \
--build-arg FROM="$from" \
--cache-from "$(image-name "$2")" \
--platform linux/amd64,linux/arm64 \
--tag "$target" .

if [[ -n $publishflag ]]; then
Expand Down

0 comments on commit e30a06e

Please sign in to comment.