Update ci.yml

first move to buildx for multiarch build
This commit is contained in:
Grigory Bakunov
2021-04-11 10:13:11 +03:00
committed by GitHub
parent a1d14d2707
commit 7fa94b9502

View File

@@ -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:
@@ -54,5 +64,6 @@ 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 -t ghcr.io/${USERNAME}/reproxy:${ref} .
docker push ghcr.io/${USERNAME}/reproxy:${ref}
docker buildx build --push \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
-t ghcr.io/${USERNAME}/reproxy:${ref} .