diff --git a/.github/workflows/create-pre-release.yml b/.github/workflows/create-pre-release.yml index 222f5e0..b3d7f42 100644 --- a/.github/workflows/create-pre-release.yml +++ b/.github/workflows/create-pre-release.yml @@ -16,17 +16,24 @@ jobs: with: ref: "dev" + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Build and Publish Docker Image @:next run: | # copose image ID and change all uppercase to lowercase IMAGE_ID=ghcr.io/${{ github.repository }} IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # build docker image - docker build . --file Dockerfile --tag $IMAGE_ID:next - # log into docker registry echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - # push images - docker push $IMAGE_ID:next + # build docker images and push to registry + docker buildx build . \ + --file Dockerfile \ + --tag $IMAGE_ID:next \ + --platform linux/amd64,linux/arm64 \ + --push diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index fa8dd04..22c4479 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -89,6 +89,12 @@ jobs: repo: context.repo.repo, title: 'next' }); + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 - name: Build and Publish Docker Image @:latest and @:v_._._ run: | @@ -100,12 +106,13 @@ jobs: VERSION=${{ steps.changelog.outputs.tag }} VERSION=$(echo $VERSION | sed -e 's/^v//') - # build docker image - docker build . --file Dockerfile --tag $IMAGE_ID:latest --tag $IMAGE_ID:$VERSION - # log into docker registry echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - # push images - docker push $IMAGE_ID:latest - docker push $IMAGE_ID:$VERSION + + # build docker image and push to registry + docker buildx build . \ + --file Dockerfile \ + --tag $IMAGE_ID:latest \ + --tag $IMAGE_ID:$VERSION \ + --platform linux/amd64,linux/arm64 \ + --push