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¹.

¹ https://github.com/docker/build-push-action/blob/965c6a410d446a30e95d35052c67d6eded60dad6/docs/advanced/multi-platform.md
  • Loading branch information
victorlin committed Dec 1, 2022
1 parent ec34c82 commit 63d4c0f
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 @@ -30,6 +30,8 @@ jobs:
# and hyphens.
run: echo "TAG=branch-${GITHUB_REF_NAME//[^A-Za-z0-9._-]/-}" | tee -a $GITHUB_ENV

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

# GITHUB_TOKEN is unreliable¹ so use a token from nextstrain-bot.
# ¹ https://github.com/docker/build-push-action/issues/463#issuecomment-939394233
- uses: docker/login-action@v1
Expand All @@ -38,7 +40,7 @@ jobs:
username: nextstrain-bot
password: ${{ secrets.GH_TOKEN_NEXTSTRAIN_BOT_MANAGE_PACKAGES }}

- run: ./devel/build -p linux/amd64 -r ghcr.io -t $TAG
- run: ./devel/build -p linux/amd64,linux/arm64 -r ghcr.io -t $TAG

outputs:
tag: ${{ env.TAG }}
Expand Down

0 comments on commit 63d4c0f

Please sign in to comment.