diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10b5978..c2c7b13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,16 @@ jobs: env: COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: available platforms + run: echo ${{ steps.buildx.outputs.platforms }} + - name: build and deploy image if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') }} env: @@ -56,5 +66,7 @@ jobs: ref="$(echo ${GITHUB_REF} | cut -d'/' -f3)" echo GITHUB_REF - $ref echo ${GITHUB_PACKAGE_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin - docker build --build-arg CI=github --build-arg GITHUB_SHA=${GITHUB_SHA} --build-arg GIT_BRANCH=${ref} -t ghcr.io/${USERNAME}/reproxy:${ref} . - docker push ghcr.io/${USERNAME}/reproxy:${ref} + docker buildx build --push \ + --build-arg CI=github --build-arg GITHUB_SHA=${GITHUB_SHA} --build-arg GIT_BRANCH=${ref} \ + --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ + -t ghcr.io/${USERNAME}/reproxy:${ref} .