From a9f68c613ad3d06bc7f00554a245619ddd3514d2 Mon Sep 17 00:00:00 2001 From: Bagas Aulia Rezki Date: Tue, 8 Oct 2024 19:20:54 +0700 Subject: [PATCH] Build Docker images for x86 and ARM architectures --- .github/workflows/main.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3850c3b..fbc6a27 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,18 +9,18 @@ on: jobs: build-and-push: runs-on: ubuntu-latest - + steps: - name: Checkout repository uses: actions/checkout@v2 - + - name: Log in to Docker Hub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push Docker image + + - name: Build and push Docker image for main uses: docker/build-push-action@v2 with: context: . @@ -28,8 +28,9 @@ jobs: tags: | ${{ secrets.DOCKERHUB_USERNAME }}/filekeeper:${{ github.ref_name }} ${{ secrets.DOCKERHUB_USERNAME }}/filekeeper:latest + platforms: linux/amd64,linux/arm64 if: github.ref == 'refs/heads/main' - + - name: Build and push Docker image for staging uses: docker/build-push-action@v2 with: @@ -37,4 +38,5 @@ jobs: push: true tags: | ${{ secrets.DOCKERHUB_USERNAME }}/filekeeper:staging + platforms: linux/amd64,linux/arm64 if: github.ref == 'refs/heads/staging'