diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 8fd60f2..66d5ab9 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -20,13 +20,16 @@ jobs: # steps to perform in job steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Checkout code uses: actions/checkout@v3 # setup Docker buld action - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to Github Packages uses: docker/login-action@v2 @@ -36,14 +39,16 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build image and push to Docker Hub and GitHub Container Registry - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v6 with: # relative path to the place where source code with Dockerfile is located + platforms: linux/amd64,linux/arm64 context: . file: ./Dockerfile # Note: tags has to be all lower-case tags: | ghcr.io/linus-berg/apc/${{ matrix.services.name }}:latest + ghcr.io/linus-berg/apc/${{ matrix.services.name }}:${{ github.sha }} # build on feature branches, push only on main branch push: ${{ github.ref == 'refs/heads/master' }}