Skip to content

Commit

Permalink
Add Github workflow steps to build multi-architecture Docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
pbstriker38 committed Feb 17, 2021
1 parent 236887d commit dfe6d4d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -46,3 +46,36 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: release --config .github/goreleaser.yml
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: jpillora/chisel
tag-latest: true
# Outputs:
# jpillora/chisel:1.2.3
# jpillora/chisel:1.2
# jpillora/chisel:1
# jpillora/chisel:latest
tag-semver: |
{{version}}
{{major}}.{{minor}}
{{major}}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/386,linux/arm/v7,linux/arm/v6
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

0 comments on commit dfe6d4d

Please sign in to comment.