diff --git a/.github/workflows/backend-latest.yml b/.github/workflows/backend-latest.yml index 66faa70f..5351d9d6 100644 --- a/.github/workflows/backend-latest.yml +++ b/.github/workflows/backend-latest.yml @@ -30,17 +30,17 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build Docker image - run: docker build -t $IMAGE_NAME:latest ./backend - - - name: Tag Docker image for GHCR - run: docker tag $IMAGE_NAME:latest ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest - - - name: Tag Docker image for Docker Hub - run: docker tag $IMAGE_NAME:latest ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:latest - - - name: Push Docker image to GHCR - run: docker push ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest - - - name: Push Docker image to Docker Hub - run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:latest + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: set lower case owner name + run: | + echo "REPO_OWNER=${OWNER,,}" >>${GITHUB_ENV} + env: + OWNER: '${{ github.repository_owner }}' + + - name: Build Docker images + run: docker buildx build --platform linux/amd64,linux/arm64 --push -t ghcr.io/$REPO_OWNER/$IMAGE_NAME:latest -t ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:latest ./backend diff --git a/.github/workflows/frontend-latest.yml b/.github/workflows/frontend-latest.yml index 35828061..a74ae2f5 100644 --- a/.github/workflows/frontend-latest.yml +++ b/.github/workflows/frontend-latest.yml @@ -29,18 +29,18 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build Docker image - run: docker build -t $IMAGE_NAME:latest ./frontend - - - name: Tag Docker image for GHCR - run: docker tag $IMAGE_NAME:latest ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest - - - name: Tag Docker image for Docker Hub - run: docker tag $IMAGE_NAME:latest ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:latest - - - name: Push Docker image to GHCR - run: docker push ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest - - - name: Push Docker image to Docker Hub - run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:latest + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: set lower case owner name + run: | + echo "REPO_OWNER=${OWNER,,}" >>${GITHUB_ENV} + env: + OWNER: '${{ github.repository_owner }}' + + - name: Build Docker images + run: docker buildx build --platform linux/amd64,linux/arm64 --push -t ghcr.io/$REPO_OWNER/$IMAGE_NAME:latest -t ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:latest ./frontend