Skip to content

Commit 40ef80c

Browse files
authored
refactor(docker-build): add inputs for selecting runner images (#53)
1 parent 7500059 commit 40ef80c

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

Diff for: .github/workflows/docker-build-push-multi-platform.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
on:
22
workflow_call:
33
inputs:
4+
amd64-runner-image:
5+
description: >-
6+
Runner image to use for building AMD64 image.
7+
required: false
8+
type: string
9+
default: ubuntu-latest
10+
arm64-runner-image:
11+
description: >-
12+
Runner image to use for building ARM64 image.
13+
required: false
14+
type: string
15+
default: ubuntu-latest
416
registry-image:
517
description: >-
618
Docker image to use as base name for tags.
@@ -63,9 +75,9 @@ jobs:
6375
fail-fast: false
6476
matrix:
6577
builder:
66-
- runner-image: ubuntu-latest
78+
- runner-image: ${{ inputs.amd64-runner-image }}
6779
platform: linux/amd64
68-
- runner-image: ubuntu-latest
80+
- runner-image: ${{ inputs.arm64-runner-image }}
6981
platform: linux/arm64
7082
steps:
7183
- name: Prepare

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ GitHub action for using a matrix strategy to distribute the build for
2929

3030
**Inputs**:
3131

32+
- `amd64-runner-image` (`string`): Runner image to use for building AMD64 image.
33+
Defaults to `ubuntu-latest`. Optional.
34+
- `arm64-runner-image` (`string`): Runner image to use for building ARM64 image.
35+
Defaults to `ubuntu-latest`. Optional.
3236
- `registry-image` (`string`): Docker image to use as base name for tags.
3337
- `metadata-tags` (`string`): List of tags as key-value pair attributes.
3438
Optional.

0 commit comments

Comments
 (0)