@@ -9,7 +9,6 @@ concurrency:
99 cancel-in-progress : true
1010permissions :
1111 contents : write
12- packages : write
1312 pull-requests : write
1413 actions : read
1514jobs :
@@ -21,14 +20,18 @@ jobs:
2120 strategy :
2221 fail-fast : true
2322 matrix :
23+ # runner is a label, or a JSON array of labels so the RUNNER_* repo
24+ # variables can target self-hosted label sets.
2425 include :
2526 - arch : amd64
2627 platform : linux/amd64
2728 runner : ubuntu-latest
2829 - arch : arm64
2930 platform : linux/arm64
30- runner : ubuntu-latest-arm64
31- runs-on : ${{ matrix.runner }}
31+ runner : ${{ vars.RUNNER_ARM64 || 'ubuntu-latest-arm64' }}
32+ runs-on :
33+ ${{ startsWith(matrix.runner, '[') && fromJSON(matrix.runner) ||
34+ matrix.runner }}
3235 steps :
3336 - name : Checkout
3437 uses : actions/checkout@v6
3942 with :
4043 username : ${{ secrets.DOCKER_HUB_USERNAME }}
4144 password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
42- - name : Login to GitHub Container Registry
43- uses : docker/login-action@v3
44- with :
45- registry : ghcr.io
46- username : ${{ github.actor }}
47- password : ${{ secrets.GITHUB_TOKEN }}
4845 - name : Load Environment Variables from .env
4946 uses : xom9ikk/dotenv@v2
5047 - name : Build and Push
@@ -99,11 +96,13 @@ jobs:
9996 include :
10097 - arch : amd64
10198 platform : linux/amd64
102- runner : Large-Runner-x64-32
99+ runner : ${{ vars.RUNNER_LARGE_X64 || ' Large-Runner-x64-32' }}
103100 - arch : arm64
104101 platform : linux/arm64
105- runner : Large-Runner-ARM64-32
106- runs-on : ${{ matrix.runner }}
102+ runner : ${{ vars.RUNNER_LARGE_ARM64 || 'Large-Runner-ARM64-32' }}
103+ runs-on :
104+ ${{ startsWith(matrix.runner, '[') && fromJSON(matrix.runner) ||
105+ matrix.runner }}
107106 steps :
108107 - name : Checkout
109108 uses : actions/checkout@v6
@@ -114,12 +113,6 @@ jobs:
114113 with :
115114 username : ${{ secrets.DOCKER_HUB_USERNAME }}
116115 password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
117- - name : Login to GitHub Container Registry
118- uses : docker/login-action@v3
119- with :
120- registry : ghcr.io
121- username : ${{ github.actor }}
122- password : ${{ secrets.GITHUB_TOKEN }}
123116 - name : Load Environment Variables from .env
124117 uses : xom9ikk/dotenv@v2
125118 - name : Build and Push
@@ -136,6 +129,7 @@ jobs:
136129 CODE_VERSION=${{ env.IMAGE_NIGHTLY_TAG }}
137130 tags : |
138131 ${{ env.IMAGE_NAME_DOCKERHUB }}:${{ env.IMAGE_NIGHTLY_TAG }}-${{ matrix.arch }}
132+ ${{ env.NEXT_IMAGE_NAME_DOCKERHUB }}:${{ env.IMAGE_NIGHTLY_TAG }}-${{ matrix.arch }}
139133 push : true
140134 sbom : true
141135 provenance : true
@@ -158,14 +152,15 @@ jobs:
158152 password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
159153 - name : Setup Docker Buildx
160154 uses : docker/setup-buildx-action@v3
161- - name : Create multi-arch manifest
155+ - name : Create multi-arch manifests
162156 run : |
163157 TAG="${{ env.IMAGE_NIGHTLY_TAG }}"
164- IMAGE="${{ env.IMAGE_NAME_DOCKERHUB }}"
165- docker buildx imagetools create \
166- -t "${IMAGE}:${TAG}" \
167- "${IMAGE}:${TAG}-amd64" \
168- "${IMAGE}:${TAG}-arm64"
158+ for IMAGE in "${{ env.IMAGE_NAME_DOCKERHUB }}" "${{ env.NEXT_IMAGE_NAME_DOCKERHUB }}"; do
159+ docker buildx imagetools create \
160+ -t "${IMAGE}:${TAG}" \
161+ "${IMAGE}:${TAG}-amd64" \
162+ "${IMAGE}:${TAG}-arm64"
163+ done
169164
170165 # ---------------------------------------------------------------------------
171166 # Local Nightly (all-in-one-noauth)
@@ -178,11 +173,13 @@ jobs:
178173 include :
179174 - arch : amd64
180175 platform : linux/amd64
181- runner : Large-Runner-x64-32
176+ runner : ${{ vars.RUNNER_LARGE_X64 || ' Large-Runner-x64-32' }}
182177 - arch : arm64
183178 platform : linux/arm64
184- runner : Large-Runner-ARM64-32
185- runs-on : ${{ matrix.runner }}
179+ runner : ${{ vars.RUNNER_LARGE_ARM64 || 'Large-Runner-ARM64-32' }}
180+ runs-on :
181+ ${{ startsWith(matrix.runner, '[') && fromJSON(matrix.runner) ||
182+ matrix.runner }}
186183 steps :
187184 - name : Checkout
188185 uses : actions/checkout@v6
@@ -193,12 +190,6 @@ jobs:
193190 with :
194191 username : ${{ secrets.DOCKER_HUB_USERNAME }}
195192 password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
196- - name : Login to GitHub Container Registry
197- uses : docker/login-action@v3
198- with :
199- registry : ghcr.io
200- username : ${{ github.actor }}
201- password : ${{ secrets.GITHUB_TOKEN }}
202193 - name : Load Environment Variables from .env
203194 uses : xom9ikk/dotenv@v2
204195 - name : Build and Push
@@ -261,11 +252,13 @@ jobs:
261252 include :
262253 - arch : amd64
263254 platform : linux/amd64
264- runner : Large-Runner-x64-32
255+ runner : ${{ vars.RUNNER_LARGE_X64 || ' Large-Runner-x64-32' }}
265256 - arch : arm64
266257 platform : linux/arm64
267- runner : Large-Runner-ARM64-32
268- runs-on : ${{ matrix.runner }}
258+ runner : ${{ vars.RUNNER_LARGE_ARM64 || 'Large-Runner-ARM64-32' }}
259+ runs-on :
260+ ${{ startsWith(matrix.runner, '[') && fromJSON(matrix.runner) ||
261+ matrix.runner }}
269262 steps :
270263 - name : Checkout
271264 uses : actions/checkout@v6
@@ -276,12 +269,6 @@ jobs:
276269 with :
277270 username : ${{ secrets.DOCKER_HUB_USERNAME }}
278271 password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
279- - name : Login to GitHub Container Registry
280- uses : docker/login-action@v3
281- with :
282- registry : ghcr.io
283- username : ${{ github.actor }}
284- password : ${{ secrets.GITHUB_TOKEN }}
285272 - name : Load Environment Variables from .env
286273 uses : xom9ikk/dotenv@v2
287274 - name : Build and Push
0 commit comments