Skip to content

Commit

Permalink
Add: Docker multi arch images
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
  • Loading branch information
nlamirault committed Sep 17, 2021
1 parent 6813326 commit 5ee2455
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1.2.0

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

- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Log in to the Container registry
uses: docker/login-action@v1.10.0
with:
Expand All @@ -51,10 +61,12 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v2.7.0
- name: Build
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: false
tags: ${{ steps.prep.outputs.tags }}
22 changes: 17 additions & 5 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1.2.0

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

- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Log in to the Container registry
uses: docker/login-action@v1.10.0
with:
Expand All @@ -52,10 +62,12 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v2.7.0
- name: Build
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.prep.outputs.tags }}

0 comments on commit 5ee2455

Please sign in to comment.