From 217950d28b3ff680174192b131903c417819c9ed Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Wed, 23 Oct 2024 15:17:58 -0300 Subject: [PATCH] feat: build hashed images in parallel --- .github/workflows/docker-publish.yml | 68 +++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 2c37abc2..a14359db 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -38,7 +38,38 @@ jobs: with: context: . push: true - tags: ghcr.io/fuellabs/fuel-bridge:${{ github.event.pull_request.base.sha }} + tags: ghcr.io/fuellabs/fuel-bridge:latest + file: docker/l1-chain/Dockerfile + platforms: linux/amd64,linux/arm64 + build-fuel-bridge-hashed: + name: Build and Push fuel-bridge Image hashed tag + runs-on: buildjet-4vcpu-ubuntu-2204 + steps: + - uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Get short SHA + id: short_sha + run: echo "::set-output name=SHORT_SHA::${GITHUB_SHA::7}" + + - name: Build and push multi-arch fuel-bridge image + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ghcr.io/fuellabs/fuel-bridge:${{ steps.short_sha.outputs.SHORT_SHA }} file: docker/l1-chain/Dockerfile platforms: linux/amd64,linux/arm64 @@ -66,6 +97,39 @@ jobs: with: context: . push: true - tags: ghcr.io/fuellabs/fuel-bridge-full:${{ github.event.pull_request.base.sha }} + tags: ghcr.io/fuellabs/fuel-bridge-full:latest + file: docker/full-env/Dockerfile + platforms: linux/amd64,linux/arm64 + + build-fuel-bridge-full-hashed: + name: Build and Push fuel-bridge-full Image hashed tag + runs-on: buildjet-4vcpu-ubuntu-2204 + steps: + - uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Get short SHA + id: short_sha + run: echo "::set-output name=SHORT_SHA::${GITHUB_SHA::7}" + + - name: Build and push multi-arch fuel-bridge-full image + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ghcr.io/fuellabs/fuel-bridge:${{ steps.short_sha.outputs.SHORT_SHA }} file: docker/full-env/Dockerfile platforms: linux/amd64,linux/arm64 +