Skip to content

Commit dfe6d4d

Browse files
committed
Add Github workflow steps to build multi-architecture Docker images
1 parent 236887d commit dfe6d4d

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,36 @@ jobs:
4646
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4747
with:
4848
args: release --config .github/goreleaser.yml
49+
- name: Set up QEMU
50+
uses: docker/setup-qemu-action@v1
51+
- name: Set up Docker Buildx
52+
id: buildx
53+
uses: docker/setup-buildx-action@v1
54+
- name: Login to DockerHub
55+
uses: docker/login-action@v1
56+
with:
57+
username: ${{ secrets.DOCKERHUB_USERNAME }}
58+
password: ${{ secrets.DOCKERHUB_TOKEN }}
59+
- name: Docker meta
60+
id: docker_meta
61+
uses: crazy-max/ghaction-docker-meta@v1
62+
with:
63+
images: jpillora/chisel
64+
tag-latest: true
65+
# Outputs:
66+
# jpillora/chisel:1.2.3
67+
# jpillora/chisel:1.2
68+
# jpillora/chisel:1
69+
# jpillora/chisel:latest
70+
tag-semver: |
71+
{{version}}
72+
{{major}}.{{minor}}
73+
{{major}}
74+
- name: Build and push
75+
uses: docker/build-push-action@v2
76+
with:
77+
context: .
78+
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/386,linux/arm/v7,linux/arm/v6
79+
push: true
80+
tags: ${{ steps.docker_meta.outputs.tags }}
81+
labels: ${{ steps.docker_meta.outputs.labels }}

0 commit comments

Comments
 (0)