From e7be2194ade2ac6bd2845ccfdeba734d02f57332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez=20Baquero?= Date: Tue, 16 Jan 2024 13:16:58 -0500 Subject: [PATCH] Do both platforms in parallel, update actions versions (#520) --- .github/workflows/release.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d7a4c195..4cdf507f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,16 +23,20 @@ jobs: build-and-push-image: runs-on: larger + strategy: + matrix: + platform: [linux/amd64, linux/arm64] + permissions: contents: read packages: write steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to the Container registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -40,7 +44,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} @@ -57,12 +61,12 @@ jobs: printf ${{ secrets.STAGING_BASE64_JWT_PUBLIC_KEY }} | base64 --decode > ./container/nginx/jwt_pub.key - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 with: platforms: "arm64" - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Set the git short sha id: git @@ -95,7 +99,7 @@ jobs: echo "version_docker_tags=$repo:${{ github.run_number}}_${{ steps.git.outputs.sha_short }}" - name: Build and push Docker image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: context: . push: true @@ -103,7 +107,7 @@ jobs: ${{ steps.tags.outputs.version_docker_tags }} ${{ steps.tags.outputs.mutable_docker_tags }} labels: ${{ steps.meta.outputs.labels }} - platforms: linux/amd64,linux/arm64 + platforms: ${{ matrix.platform }} cache-from: type=gha,scope=l1 cache-to: type=gha,mode=max,scope=l1 build-args: |