Skip to content

Commit

Permalink
ci: Set up emulation and build for arm64
Browse files Browse the repository at this point in the history
Previous commits enable this to work.

Emulation is necessary to build arm64 on an amd64 host machine [1].

[1]: https://github.com/docker/build-push-action/blob/965c6a410d446a30e95d35052c67d6eded60dad6/docs/advanced/multi-platform.md
  • Loading branch information
victorlin authored Oct 18, 2022
1 parent ae3f9a6 commit 29e42a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ jobs:
# and hyphens.
run: echo "TAG=branch-${GITHUB_REF_NAME//[^A-Za-z0-9._-]/-}" | tee -a $GITHUB_ENV

- uses: docker/setup-qemu-action@v2

- run: ./devel/start-localhost-registry $REGISTRY_PORT

- run: ./devel/build-to-localhost -p linux/amd64 -r localhost:$REGISTRY_PORT -t $TAG
- run: ./devel/build-to-localhost -p linux/amd64,linux/arm64 -r localhost:$REGISTRY_PORT -t $TAG

- if: github.event_name != 'pull_request'
uses: docker/login-action@v1
Expand Down

0 comments on commit 29e42a4

Please sign in to comment.