Skip to content

Commit

Permalink
feat: use containerd backend
Browse files Browse the repository at this point in the history
That should allow to load multiarch images.
  • Loading branch information
nijel committed Nov 8, 2024
1 parent f88662f commit d4151e5
Showing 1 changed file with 15 additions and 23 deletions.
38 changes: 15 additions & 23 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up containerd
uses: crazy-max/ghaction-setup-containerd@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand Down Expand Up @@ -65,6 +68,18 @@ jobs:
type=edge,branch=main
type=sha,format=long
- name: Build and push (base)
uses: docker/build-push-action@v6
with:
context: base
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.base.outputs.tags }}
labels: ${{ steps.base.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
load: true

- name: Docker meta (dev)
id: dev
uses: docker/metadata-action@v5
Expand All @@ -84,29 +99,6 @@ jobs:
type=edge,branch=main
type=sha,format=long
- name: Build and push (base)
uses: docker/build-push-action@v6
with:
context: base
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.base.outputs.tags }}
labels: ${{ steps.base.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max

# This build should be cached, but needed to load
# image for dev container as load does not work with multiple
# platforms
- name: Build and load (base)
uses: docker/build-push-action@v6
with:
context: base
tags: ${{ steps.base.outputs.tags }}
labels: ${{ steps.base.outputs.labels }}
load: true
cache-from: type=gha

- name: Build and push (dev)
uses: docker/build-push-action@v6
with:
Expand Down

0 comments on commit d4151e5

Please sign in to comment.