From 53c9d482ef3750f5e8a88c7382a7f1d025617e65 Mon Sep 17 00:00:00 2001 From: Kalyvas Emmanouil <33424179+MnAppsNet@users.noreply.github.com> Date: Sat, 17 Aug 2024 11:09:12 +0300 Subject: [PATCH 1/2] Update backend-latest.yml Multi-Platform docker images backend --- .github/workflows/backend-latest.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) 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 From af0088da10af985554876b277db72b45a4890573 Mon Sep 17 00:00:00 2001 From: Kalyvas Emmanouil <33424179+MnAppsNet@users.noreply.github.com> Date: Sat, 17 Aug 2024 11:10:55 +0300 Subject: [PATCH 2/2] Update frontend-latest.yml Multi-Platform docker images frontend --- .github/workflows/frontend-latest.yml | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) 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