Skip to content

Commit

Permalink
chore: Update GitHub actions to build images for multiple platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfarias committed May 30, 2021
1 parent 5fae94f commit 6652bad
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/release_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,19 @@ jobs:

image_release:
needs: build
if: ${{ success() }} && github.event_name != 'pull_request'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: crazy-max/ghaction-docker-buildx@v3
with:
buildx-version: latest
qemu-version: latest

- name: Login to DockerHub
uses: docker/login-action@v1
with:
Expand All @@ -76,8 +83,12 @@ jobs:
tagRegex: "v(.*)"
tagRegexGroup: 1

- name: Docker build and push
uses: docker/build-push-action@v2
with:
push: true
tags: tomasfarias/c2g:${{ steps.tagName.outputs.tag }},tomasfarias/c2g:latest
- name: Docker buildx and push
run: |
docker buildx build \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
--output "type=image,push=true" \
--tag tomasfarias/c2g:latest \
--tag tomasfarias/c2g:${{ steps.tagName.outputs.tag }} \
--file ./Dockerfile .

0 comments on commit 6652bad

Please sign in to comment.