From 74d6527cdeae44548cdcc4cc5bacff7df46b9a8d Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Thu, 25 Aug 2022 22:54:32 +0000 Subject: [PATCH] ci: Set up emulation and build for arm64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14b88ff0..80032f33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 }}