From 7a08a820a4d2851d53a17b802f559645458cc3c0 Mon Sep 17 00:00:00 2001 From: Ariel Melendez Date: Tue, 11 Jun 2024 11:55:08 -0700 Subject: [PATCH 1/3] chore(arm builds): add arm builds --- .github/workflows/test_and_build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index fb2554d..1915fc4 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -29,7 +29,7 @@ jobs: push: needs: [build] - if: ${{ github.ref == 'refs/heads/main' }} + if: ${{ github.ref == 'refs/heads/PE-6262_arm_builds' }} runs-on: ubuntu-latest permissions: id-token: write @@ -50,8 +50,8 @@ jobs: uses: docker/build-push-action@v4 with: push: true + platforms: linux/amd64,linux/arm64 tags: | - ghcr.io/ardriveapp/${{ github.event.repository.name }}:latest ghcr.io/ardriveapp/${{ github.event.repository.name }}:${{ github.sha }} - name: Build and push fulfillment container image to GitHub Container Registry @@ -59,8 +59,8 @@ jobs: with: file: Dockerfile.fulfillment push: true + platforms: linux/amd64,linux/arm64 tags: | - ghcr.io/ardriveapp/${{ github.event.repository.name }}-fulfillment:latest ghcr.io/ardriveapp/${{ github.event.repository.name }}-fulfillment:${{ github.sha }} - name: Build and push localstack container image to GitHub Container Registry @@ -68,6 +68,6 @@ jobs: with: file: Dockerfile.localstack push: true + platforms: linux/amd64,linux/arm64 tags: | - ghcr.io/ardriveapp/${{ github.event.repository.name }}-localstack:latest ghcr.io/ardriveapp/${{ github.event.repository.name }}-localstack:${{ github.sha }} From 4b2bc6b261246b4690fe2499c429f6831b7603e0 Mon Sep 17 00:00:00 2001 From: Ariel Melendez Date: Tue, 11 Jun 2024 12:18:47 -0700 Subject: [PATCH 2/3] chore(arm builds): use correct docker build env for arm builds --- .github/workflows/test_and_build.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 1915fc4..bacb4b0 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -37,17 +37,24 @@ jobs: checks: write packages: write steps: + # Prepare the Docker build environment + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v3 + - uses: actions/checkout@v4 # Build and push container image to GCR (only on main branch) - name: Log in to the GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push upload service container image to GitHub Container Registry - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: push: true platforms: linux/amd64,linux/arm64 @@ -55,7 +62,7 @@ jobs: ghcr.io/ardriveapp/${{ github.event.repository.name }}:${{ github.sha }} - name: Build and push fulfillment container image to GitHub Container Registry - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: file: Dockerfile.fulfillment push: true @@ -64,7 +71,7 @@ jobs: ghcr.io/ardriveapp/${{ github.event.repository.name }}-fulfillment:${{ github.sha }} - name: Build and push localstack container image to GitHub Container Registry - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: file: Dockerfile.localstack push: true From 4e52302595f9a8eac3bf1edc44f770e3b5b8518e Mon Sep 17 00:00:00 2001 From: Ariel Melendez Date: Tue, 11 Jun 2024 15:27:23 -0700 Subject: [PATCH 3/3] chore(arm builds): restore appropriate container tags --- .github/workflows/test_and_build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index bacb4b0..328404b 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -29,7 +29,7 @@ jobs: push: needs: [build] - if: ${{ github.ref == 'refs/heads/PE-6262_arm_builds' }} + if: ${{ github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest permissions: id-token: write @@ -59,6 +59,7 @@ jobs: push: true platforms: linux/amd64,linux/arm64 tags: | + ghcr.io/ardriveapp/${{ github.event.repository.name }}:latest ghcr.io/ardriveapp/${{ github.event.repository.name }}:${{ github.sha }} - name: Build and push fulfillment container image to GitHub Container Registry @@ -68,6 +69,7 @@ jobs: push: true platforms: linux/amd64,linux/arm64 tags: | + ghcr.io/ardriveapp/${{ github.event.repository.name }}-fulfillment:latest ghcr.io/ardriveapp/${{ github.event.repository.name }}-fulfillment:${{ github.sha }} - name: Build and push localstack container image to GitHub Container Registry @@ -77,4 +79,5 @@ jobs: push: true platforms: linux/amd64,linux/arm64 tags: | + ghcr.io/ardriveapp/${{ github.event.repository.name }}-localstack:latest ghcr.io/ardriveapp/${{ github.event.repository.name }}-localstack:${{ github.sha }}