diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68be842..4aa0eb7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,6 +54,14 @@ jobs: env: SEMANTIC_OUTPUTS: ${{ toJson(steps.semantic-dry-run.outputs) }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: docker login run: | echo "$GCR_TOKEN" | docker login ghcr.io -u codfish --password-stdin @@ -62,9 +70,12 @@ jobs: # Dockerhub is auto synced with the repo, no need to explicitly deploy - name: build and push latest docker image to GCR - run: | - docker build -t ghcr.io/codfish/semantic-release-action:latest . - docker push ghcr.io/codfish/semantic-release-action:latest + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/arm64,linux/amd64 + push: true + tags: ghcr.io/codfish/semantic-release-action:latest - name: push docker images for releases to GCR if: steps.semantic.outputs.new-release-published == 'true' diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 39fe32e..864c02c 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -64,6 +64,14 @@ jobs: env: OUTPUTS: ${{ toJson(steps.semantic.outputs) }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: docker login run: | echo "$GCR_TOKEN" | docker login ghcr.io -u codfish --password-stdin @@ -72,6 +80,9 @@ jobs: # Dockerhub is auto synced with the repo, no need to explicitly deploy - name: build and push branch docker image to GCR - run: | - docker build -t ghcr.io/codfish/semantic-release-action:$GITHUB_HEAD_REF . - docker push ghcr.io/codfish/semantic-release-action:$GITHUB_HEAD_REF + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/arm64,linux/amd64 + push: true + tags: ghcr.io/codfish/semantic-release-action:${{ github.head_ref }}