From 39606c9e32d5e1302930d52fc413f25d400e0f24 Mon Sep 17 00:00:00 2001 From: nikola Date: Wed, 21 Aug 2024 12:57:28 +0300 Subject: [PATCH] add arm64 arch to ghcr --- .github/workflows/ghcr.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml index 8f5ef9b2..a41a5d9d 100644 --- a/.github/workflows/ghcr.yml +++ b/.github/workflows/ghcr.yml @@ -13,10 +13,15 @@ jobs: build: name: Docker images for ghcr.io runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest] + arch: [amd64, arm64] env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true DOCKER_REGISTRY: ghcr.io DOCKER_IMAGE_BASE: ${{ github.repository }} + DOCKER_PLATFORM: linux/${{ matrix.arch }} steps: - name: Check out the repo uses: actions/checkout@v3 @@ -37,7 +42,7 @@ jobs: id: meta-all uses: docker/metadata-action@v3 with: - images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}/stone-prover + images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}/stone-prover-${{ matrix.arch }} - name: Prover&Verifier image build & push uses: docker/build-push-action@v3 @@ -45,7 +50,7 @@ jobs: context: . file: Dockerfile push: true - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORM }} cache-from: type=gha cache-to: type=gha,mode=max tags: ${{ steps.meta-all.outputs.tags }} @@ -58,14 +63,14 @@ jobs: id: meta uses: docker/metadata-action@v3 with: - images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}/cpu_air_prover + images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}/cpu_air_prover-${{ matrix.arch }} - name: Prover image build & push uses: docker/build-push-action@v3 with: context: . file: air_prover/Dockerfile push: true - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORM }} cache-from: type=gha cache-to: type=gha,mode=max tags: ${{ steps.meta.outputs.tags }} @@ -77,14 +82,14 @@ jobs: id: meta-ver uses: docker/metadata-action@v3 with: - images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}/cpu_air_verifier + images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}/cpu_air_verifier-${{ matrix.arch }} - name: Verifier image build & push uses: docker/build-push-action@v3 with: context: . file: air_verifier/Dockerfile push: true - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORM }} cache-from: type=gha cache-to: type=gha,mode=max tags: ${{ steps.meta-ver.outputs.tags }}