Skip to content

Commit

Permalink
Updated Workflow to build for multiarch
Browse files Browse the repository at this point in the history
  • Loading branch information
warrmr committed Dec 4, 2021
1 parent 28c4e6f commit 8128f1b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build image
run: docker build . --file Dockerfile --tag $IMAGE_NAME
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Log into registry
run: echo "${{ secrets.PACKAGE_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Push image
- name: Build and Push image
run: |
IMAGE_ID=ghcr.io/${{ github.repository }}/$IMAGE_NAME
Expand All @@ -50,5 +54,8 @@ jobs:
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
# Build and Publish container image
docker buidx build --push \
--tag $IMAGE_NAME $IMAGE_ID:$VERSION \
--platform linux/armhf,linux/aarch64,linux/amd64 .

0 comments on commit 8128f1b

Please sign in to comment.