11
11
# ###### Uncomment this to test the CI pipeline in a PR
12
12
# ###### You'll also need to comment the rules containing {{branch}}
13
13
# ###### in the `Extract Docker metadata` step
14
- # pull_request:
15
- # branches: [ "main" ]
14
+ pull_request :
15
+ branches : [ "main" ]
16
16
17
17
env :
18
18
# Use docker.io for Docker Hub if empty
52
52
run : |
53
53
docker run --rm ${{ env.TEST_TAG }} make ci-test
54
54
55
- build :
56
- runs-on : ubuntu-latest
55
+ build-arch :
56
+ runs-on : ${{ matrix.arch.runner }}
57
57
needs : test
58
58
permissions :
59
59
contents : read
@@ -63,11 +63,18 @@ jobs:
63
63
id-token : write
64
64
strategy :
65
65
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
66
73
docker_target :
67
- - migrations
74
+ # - migrations
68
75
- http
69
- - socketio
70
- - dramatiq
76
+ # - socketio
77
+ # - dramatiq
71
78
steps :
72
79
# GitHub gives only repository complete in <owner>/<repo> format.
73
80
# Need some manual sheanigans
79
86
- name : Checkout repository
80
87
uses : actions/checkout@v4
81
88
82
- - name : Set up QEMU
83
- uses : docker/setup-qemu-action@v3
84
-
85
89
# Install the cosign tool
86
90
# https://github.com/sigstore/cosign-installer
87
91
- name : Install cosign
@@ -111,9 +115,7 @@ jobs:
111
115
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/${{ env.IMAGE_NAME }}-${{ matrix.docker_target }}
112
116
# generate Docker tags based on the following events/attributes
113
117
tags : |
114
- type=sha
115
- type=raw,value={{branch}}-latest
116
- type=raw,value={{branch}}-{{date 'YYYYMMDDHHmmss'}}
118
+ type=sha-${{ matrix.arch.platform }}
117
119
118
120
# Build and push Docker image with Buildx
119
121
# https://github.com/docker/build-push-action
@@ -123,7 +125,7 @@ jobs:
123
125
with :
124
126
context : .
125
127
target : ${{ matrix.docker_target }}
126
- platforms : linux/amd64,linux/arm64
128
+ platforms : linux/${{ matrix.arch.platform }}
127
129
push : true
128
130
tags : ${{ steps.meta.outputs.tags }}
129
131
labels : ${{ steps.meta.outputs.labels }}
0 commit comments