Skip to content

Commit

Permalink
Multiplatform docker builds
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKnarf committed Apr 6, 2021
1 parent 17e31c7 commit e410079
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,24 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build Docker image
run: docker build . --tag "$IMAGE_NAME:${{ github.event.release.tag_name }}"
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log into registry
run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u $DOCKERHUB_USERNAME --password-stdin

- name: Push api image
run: docker push $IMAGE_NAME:${{ github.event.release.tag_name }}

- name: Tag as latest and push
- name: Build Docker image
run: |
docker tag "$IMAGE_NAME:${{ github.event.release.tag_name}}" $IMAGE_NAME:latest
docker push $IMAGE_NAME:latest
docker buildx build . \
--push \
--platform linux/arm/v7,linux/arm64/v8,linux/amd64 \
--tag "$IMAGE_NAME:latest" \
--tag "$IMAGE_NAME:${{ github.event.release.tag_name}}"
# This action does not yet work with dockerhub personal access token
# Issue: https://github.com/peter-evans/dockerhub-description/issues/10
Expand Down

0 comments on commit e410079

Please sign in to comment.