From 09e2a6795eb1f652353b1e974e89a3658948c8a5 Mon Sep 17 00:00:00 2001 From: salmannawaz Date: Fri, 18 Aug 2023 18:19:52 +0500 Subject: [PATCH] Docker multi-arch images push for linux/amd64, linux/arm64 (#338) --------- Co-authored-by: Salman Nawaz --- .github/workflows/push-docker-image.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push-docker-image.yml b/.github/workflows/push-docker-image.yml index 94b358db..aa09d8c1 100644 --- a/.github/workflows/push-docker-image.yml +++ b/.github/workflows/push-docker-image.yml @@ -28,8 +28,21 @@ jobs: return tagName; result-encoding: string + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - name: Build and push Dev Docker image - uses: docker/build-push-action@v1 + uses: docker/build-push-action@v4 + with: push: true username: ${{ secrets.DOCKERHUB_USERNAME }} @@ -37,13 +50,15 @@ jobs: target: dev repository: openedx/edx-notes-api-dev tags: ${{ steps.get-tag-name.outputs.result }},${{ github.sha }} + platforms: linux/amd64,linux/arm64 # - name: Build and push prod Docker image - # uses: docker/build-push-action@v1 + # uses: docker/build-push-action@v4 # with: # push: true # username: ${{ secrets.DOCKERHUB_USERNAME }} # password: ${{ secrets.DOCKERHUB_PASSWORD }} # target: prod # repository: openedx/edx-notes-api - # tags: ${{ steps.get-tag-name.outputs.result }},${{ github.sha }} \ No newline at end of file + # tags: ${{ steps.get-tag-name.outputs.result }},${{ github.sha }} + # platforms: linux/amd64,linux/arm64 \ No newline at end of file