From ca359307e74e5201d869a89c94c2d023a38869fa Mon Sep 17 00:00:00 2001 From: Luiz Felipe Limao Date: Mon, 16 Jun 2025 13:36:36 -0300 Subject: [PATCH 1/4] Add release multi arch --- .github/workflows/release.yml | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 52054248..f6794bfd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,5 @@ name: Publish Docker Image + on: release: types: @@ -6,17 +7,34 @@ on: push: tags: - 'v[0-9]+.[0-9]+.[0-9]+-[abcehlprt]+.?[0-9]?[0-9]?' + jobs: push_to_registry: - name: Publish Docker Image + name: Publish Multi-Arch Docker Image runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v2 - - name: Push to Docker Hub - uses: docker/build-push-action@v1 + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: | + tfgco/pusher:${{ github.ref_name }} repository: tfgco/pusher tag_with_ref: true From ed74e009c65acb467499ff53c6f051f69bea92aa Mon Sep 17 00:00:00 2001 From: Luiz Felipe Limao Date: Mon, 16 Jun 2025 14:01:04 -0300 Subject: [PATCH 2/4] Test runner arm64 --- .github/workflows/release.yml | 56 ++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f6794bfd..228dd44e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,15 +9,36 @@ on: - 'v[0-9]+.[0-9]+.[0-9]+-[abcehlprt]+.?[0-9]?[0-9]?' jobs: - push_to_registry: - name: Publish Multi-Arch Docker Image + build-amd64: + name: Build for linux/amd64 runs-on: ubuntu-latest steps: - name: Check out the repo uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push amd64 image + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64 + push: true + tags: tfgco/pusher:${{ github.ref_name }}-amd64 + + build-arm64: + name: Build for linux/arm64 + runs-on: ubuntu-22.04-arm + steps: + - name: Check out the repo + uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -28,13 +49,28 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push + - name: Build and push arm64 image uses: docker/build-push-action@v5 with: context: . - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 push: true - tags: | - tfgco/pusher:${{ github.ref_name }} - repository: tfgco/pusher - tag_with_ref: true + tags: tfgco/pusher:${{ github.ref_name }}-arm64 + + push-manifest: + name: Push multi-arch manifest + runs-on: ubuntu-latest + needs: [build-amd64, build-arm64] + steps: + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Create and push manifest + run: | + docker manifest create tfgco/pusher:${{ github.ref_name }} \ + --amend tfgco/pusher:${{ github.ref_name }}-amd64 \ + --amend tfgco/pusher:${{ github.ref_name }}-arm64 + docker manifest push tfgco/pusher:${{ github.ref_name }} \ No newline at end of file From 216adfba2dc2b1355654cccce5689cda06f7a3e3 Mon Sep 17 00:00:00 2001 From: Luiz Felipe Limao Date: Mon, 16 Jun 2025 14:36:55 -0300 Subject: [PATCH 3/4] Remove plataforms --- .github/workflows/release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 228dd44e..94d9ed19 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,6 @@ jobs: uses: docker/build-push-action@v5 with: context: . - platforms: linux/amd64 push: true tags: tfgco/pusher:${{ github.ref_name }}-amd64 @@ -53,7 +52,6 @@ jobs: uses: docker/build-push-action@v5 with: context: . - platforms: linux/arm64 push: true tags: tfgco/pusher:${{ github.ref_name }}-arm64 From c04baab071260088d789a727dfaa29e752ff679f Mon Sep 17 00:00:00 2001 From: Luiz Felipe Limao Date: Mon, 16 Jun 2025 14:51:39 -0300 Subject: [PATCH 4/4] add inspect --- .github/workflows/release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94d9ed19..b18a6e74 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,7 @@ jobs: context: . push: true tags: tfgco/pusher:${{ github.ref_name }}-amd64 + provenance: false build-arm64: name: Build for linux/arm64 @@ -54,6 +55,7 @@ jobs: context: . push: true tags: tfgco/pusher:${{ github.ref_name }}-arm64 + provenance: false push-manifest: name: Push multi-arch manifest @@ -65,6 +67,13 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Inspect images before creating manifest (Debug Step) + run: | + echo "--- Inspecting AMD64 image ---" + docker buildx imagetools inspect tfgco/pusher:${{ github.ref_name }}-amd64 + echo "--- Inspecting ARM64 image ---" + docker buildx imagetools inspect tfgco/pusher:${{ github.ref_name }}-arm64 - name: Create and push manifest run: |