From 22d0319bf6aa85aa33d01a2f99e52d86699c6715 Mon Sep 17 00:00:00 2001 From: Abderrahmane Smimite Date: Sat, 13 Apr 2024 10:29:46 +0200 Subject: [PATCH] Build and Push to ghcr --- .github/workflows/docker-build-and-push.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-build-and-push.yml b/.github/workflows/docker-build-and-push.yml index 8ee0b9ea21..2aec840e95 100644 --- a/.github/workflows/docker-build-and-push.yml +++ b/.github/workflows/docker-build-and-push.yml @@ -15,11 +15,13 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 0 # Ensure all history and tags are fetched - - name: Get git version - id: git_version - run: echo "VERSION=$(git describe --tags --always)" >> $GITHUB_ENV + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 - name: Log in to GitHub Container Registry uses: docker/login-action@v3 @@ -28,6 +30,9 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Get git version + run: echo "VERSION=$(git describe --tags --always)" >> $GITHUB_ENV + - name: Build and Push Backend Docker Image uses: docker/build-push-action@v5 with: @@ -37,6 +42,7 @@ jobs: tags: | ghcr.io/${{ github.repository }}/backend:${{ env.VERSION }} ghcr.io/${{ github.repository }}/backend:latest + platforms: linux/amd64,linux/arm64,linux/arm64/v8 - name: Build and Push Frontend Docker Image uses: docker/build-push-action@v5 @@ -47,3 +53,4 @@ jobs: tags: | ghcr.io/${{ github.repository }}/frontend:${{ env.VERSION }} ghcr.io/${{ github.repository }}/frontend:latest + platforms: linux/amd64,linux/arm64,linux/arm64/v8