Skip to content

Commit 8b70087

Browse files
committed
Try multiarch native build
1 parent 46deed9 commit 8b70087

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

.github/workflows/ci-pipeline.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ on:
1111
####### Uncomment this to test the CI pipeline in a PR
1212
####### You'll also need to comment the rules containing {{branch}}
1313
####### in the `Extract Docker metadata` step
14-
# pull_request:
15-
# branches: [ "main" ]
14+
pull_request:
15+
branches: [ "main" ]
1616

1717
env:
1818
# Use docker.io for Docker Hub if empty
@@ -52,8 +52,8 @@ jobs:
5252
run: |
5353
docker run --rm ${{ env.TEST_TAG }} make ci-test
5454
55-
build:
56-
runs-on: ubuntu-latest
55+
build-arch:
56+
runs-on: ${{ matrix.arch.runner }}
5757
needs: test
5858
permissions:
5959
contents: read
@@ -63,11 +63,18 @@ jobs:
6363
id-token: write
6464
strategy:
6565
matrix:
66+
arch:
67+
- platform: "amd64"
68+
runner: ubuntu-latest
69+
- platform: "arm64"
70+
# There is no latest for ARM yet
71+
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
72+
runner: ubuntu-24.04-arm
6673
docker_target:
67-
- migrations
74+
# - migrations
6875
- http
69-
- socketio
70-
- dramatiq
76+
# - socketio
77+
# - dramatiq
7178
steps:
7279
# GitHub gives only repository complete in <owner>/<repo> format.
7380
# Need some manual sheanigans
@@ -79,9 +86,6 @@ jobs:
7986
- name: Checkout repository
8087
uses: actions/checkout@v4
8188

82-
- name: Set up QEMU
83-
uses: docker/setup-qemu-action@v3
84-
8589
# Install the cosign tool
8690
# https://github.com/sigstore/cosign-installer
8791
- name: Install cosign
@@ -111,9 +115,7 @@ jobs:
111115
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/${{ env.IMAGE_NAME }}-${{ matrix.docker_target }}
112116
# generate Docker tags based on the following events/attributes
113117
tags: |
114-
type=sha
115-
type=raw,value={{branch}}-latest
116-
type=raw,value={{branch}}-{{date 'YYYYMMDDHHmmss'}}
118+
type=sha-${{ matrix.arch.platform }}
117119
118120
# Build and push Docker image with Buildx
119121
# https://github.com/docker/build-push-action
@@ -123,7 +125,7 @@ jobs:
123125
with:
124126
context: .
125127
target: ${{ matrix.docker_target }}
126-
platforms: linux/amd64,linux/arm64
128+
platforms: linux/${{ matrix.arch.platform }}
127129
push: true
128130
tags: ${{ steps.meta.outputs.tags }}
129131
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)