streamline multi-arch build, part of #81

This commit is contained in:
meeb 2021-05-27 20:12:02 +10:00
parent afda481046
commit 5ced901ae8
1 changed files with 4 additions and 7 deletions

View File

@ -36,14 +36,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create a new container builder
run: docker buildx create --name builder && docker buildx use builder
- name: Build the container image
run: docker buildx build --platform linux/amd64 --tag $IMAGE_NAME .
- name: Log into GitHub Container Registry
run: echo "${{ secrets.REGISTRY_ACCESS_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push image to GitHub Container Registry
- name: Build the container image
run: |
LATEST_TAG=ghcr.io/meeb/$IMAGE_NAME:latest
docker tag $IMAGE_NAME $LATEST_TAG
docker push $LATEST_TAG
docker buildx create --name builder
docker buildx use builder
docker buildx build --platform linux/amd64 --tag $IMAGE_NAME --push .