Skip to content

Commit 3226f2c

Browse files
committed
feat(docker-build-images): add dedicated runner for windows/arm platform
Signed-off-by: Emilien Escalle <[email protected]>
1 parent da510be commit 3226f2c

File tree

7 files changed

+99
-98
lines changed

7 files changed

+99
-98
lines changed

.github/workflows/docker-build-images.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!-- end badges -->
1010
<!-- start description -->
1111

12-
Workflow to build multiple docker images.
12+
Workflow to build multiple Docker images.
1313
Build images using [Docker build-image action](../../actions/docker/build-image/README.md)
1414
This includes [multi-platform](https://docs.docker.com/build/building/multi-platform/) build
1515

@@ -138,10 +138,10 @@ jobs:
138138

139139
| **Input** | **Description** | **Default** | **Required** | **Type** |
140140
| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- | ------------ | ----------- |
141-
| **<code>runs-on</code>** | Json array of runner(s) to use. See <https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job> | <code>["ubuntu-latest"]</code> | **false** | **string** |
141+
| **<code>runs-on</code>** | JSON array of runner(s) to use. See <https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job> | <code>["ubuntu-latest"]</code> | **false** | **string** |
142142
| **<code>oci-registry</code>** | OCI registry where to pull and push images | <code>ghcr.io</code> | **false** | **string** |
143143
| **<code>oci-registry-username</code>** | Username used to log against the OCI registry. See <https://github.com/docker/login-action#usage> | <code>${{ github.repository_owner }}</code> | **false** | **string** |
144-
| **<code>images</code>** | Images to build parameters. Json array of objects. Example: [{ "name": "application", "context": ".", "dockerfile": "./docker/application/Dockerfile", "target": "prod", "build-args": { "APP_PATH": "./application/", "PROD_MODE": "true" }, "secret-envs": { "GH_TOKEN": "GITHUB_TOKEN" }, "platforms": ["linux/amd64", { "name": "darwin/amd64", "runs-on": "macos-latest" }] }] | | **true** | **string** |
144+
| **<code>images</code>** | Images to build parameters. JSON array of objects. Example: [{ "name": "application", "context": ".", "Dockerfile": "./docker/application/Dockerfile", "target": "prod", "build-args": { "APP_PATH": "./application/", "PROD_MODE": "true" }, "secret-envs": { "GH_TOKEN": "GITHUB_TOKEN" }, "platforms": ["linux/amd64", { "name": "darwin/amd64", "runs-on": "macos-latest" }] }] | | **true** | **string** |
145145
| **<code>lfs</code>** | Enable Git LFS. See <https://github.com/actions/checkout?tab=readme-ov-file#usage>. | <code>true</code> | **false** | **boolean** |
146146
| **<code>build-secret-github-app-token-env</code>** | Environment variable name(s) to pass GitHub token generated by GitHub App. Can be a multiline string list. This is useful to pass a generated token to the build, as it is not possible to share generated secrets between jobs. Needs input `build-secret-github-app-id` and secret `build-secret-github-app-key`. | <code>GITHUB_APP_TOKEN</code> | **false** | **string** |
147147
| **<code>build-secret-github-app-id</code>** | GitHub App ID to generate GitHub token to be passed as build secret env. See <https://github.com/actions/create-github-app-token>. | | **false** | **string** |
@@ -157,7 +157,7 @@ jobs:
157157
| **<code>name</code>** | Image name. Must be unique. It is used as `image` in [Docker build-image action](../../actions/docker/build-image/README.md) | | **true** |
158158
| **<code>repository</code>** | Repository name. See [Docker build-image action](../../actions/docker/build-image/README.md) | | **false** |
159159
| **<code>context</code>** | Build context. See [Docker build-image action](../../actions/docker/build-image/README.md) | <code>.</code> | **false** |
160-
| **<code>dockerfile</code>** | Location of Dockerfile. See [Docker build-image action](../../actions/docker/build-image/README.md) | <code>Dockerfile</code> | **false** |
160+
| **<code>Dockerfile</code>** | Location of Dockerfile. See [Docker build-image action](../../actions/docker/build-image/README.md) | <code>Dockerfile</code> | **false** |
161161
| **<code>target</code>** | Sets the target stage to build. See [Docker build-image action](../../actions/docker/build-image/README.md) | | **true** |
162162
| **<code>build-args</code>** | List of build-time variables. See [Docker build-image action](../../actions/docker/build-image/README.md) | | **false** |
163163
| **<code>secret-envs</code>** | List of secret environment variables to expose to the build. See [Docker build-image action](../../actions/docker/build-image/README.md) | | **false** |
@@ -168,7 +168,7 @@ jobs:
168168
| **Parameter** | **Description** | **Default** | **Required** |
169169
| ------------------------ | ----------------------------------------------------------------------------------------------------------------- | ----------- | ------------ |
170170
| **<code>name</code>** | Platform name. Example: `linux/amd64` | | **true** |
171-
| **<code>runs-on</code>** | Json array of runner(s) to use. See <https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job> | | **false** |
171+
| **<code>runs-on</code>** | JSON array of runner(s) to use. See <https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job> | | **false** |
172172

173173
##### Default `runs-on` strategy
174174

.github/workflows/docker-build-images.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,9 @@ jobs:
250250
251251
const isRepositoryPrivate = `${{ github.event.repository.private }}` === 'true';
252252
if (!isRepositoryPrivate) {
253-
standardHostedRunnerByPlatform.push(
254-
{ runner: "ubuntu-24.04-arm", platformPattern: /^linux\/arm/ }, // FIXME: should use latest when available
253+
standardHostedRunnerByPlatform.unshift(
254+
{ runner: "ubuntu-24.04-arm", platformPattern: /^linux\/arm/ }, // FIXME: should use latest when available,
255+
{ runner: "windows-11-arm", platformPattern: /^windows\/arm/ }
255256
);
256257
}
257258

.github/workflows/prune-pull-requests-images-tags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
5858
| **Input** | **Description** | **Default** | **Required** |
5959
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ------------ |
60-
| **<code>runs-on</code>** | Json array of runner(s) to use. See [https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job](https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job) | <code>["ubuntu-latest"]</code> | **false** |
60+
| **<code>runs-on</code>** | JSON array of runner(s) to use. See [https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job](https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job) | <code>["ubuntu-latest"]</code> | **false** |
6161
| **<code>images</code>** | Images to clean. Example: <code>["application-1","application-2"]</code> | | **true** |
6262
| **<code>prune-cache-images</code>** | Prune cache image tags (like "application-1/cache"). Useful when building image with "registry" cache backend. | <code>true</code> | **false** |
6363
| **<code>prune-cache-images</code>** | The regular expression to match pull request tags. Must have a capture group for the pull request number. | <code>^pr-([0-9]+)(?:-\|$)</code> | **false** |

actions/docker/build-image/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ permissions:
127127
| <code>tag</code> | Force image tag to publish | | **false** |
128128
| <code>platform</code> | Platform to build for.<br />See <https://github.com/docker/build-push-action#inputs>. | | **true** |
129129
| <code>context</code> | Build's context is the set of files located in the specified PATH or URL.<br />See <https://github.com/docker/build-push-action#inputs>. | <code>.</code> | **false** |
130-
| <code>dockerfile</code> | Location of Dockerfile (defaults to Dockerfile).<br />See <https://github.com/docker/build-push-action#inputs>. | <code>Dockerfile</code> | **false** |
130+
| <code>Dockerfile</code> | Location of Dockerfile (defaults to Dockerfile).<br />See <https://github.com/docker/build-push-action#inputs>. | <code>Dockerfile</code> | **false** |
131131
| <code>build-args</code> | List of build-time variables.<br />See <https://github.com/docker/build-push-action#inputs>. | | **false** |
132132
| <code>target</code> | Sets the target stage to build.<br />See <https://github.com/docker/build-push-action#inputs>. | | **false** |
133133
| <code>secrets</code> | List of secrets to expose to the build.<br />See <https://docs.docker.com/build/ci/github-actions/secrets/>. | | **false** |

0 commit comments

Comments
 (0)