Skip to content

Commit b4ac57e

Browse files
authored
Support platforms as input for docker-build (#67)
1 parent 5b59c79 commit b4ac57e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.github/workflows/docker-build.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ on:
5555
secrets:
5656
required: false
5757
type: string
58+
platforms:
59+
required: false
60+
type: string
5861
secrets:
5962
REGISTRY_LOGIN:
6063
required: false
@@ -78,6 +81,10 @@ jobs:
7881
with:
7982
lfs: ${{ inputs.lfs }}
8083

84+
- name: Set up QEMU
85+
uses: docker/setup-qemu-action@v3
86+
if: inputs.platforms
87+
8188
- name: Set up Docker Buildx
8289
uses: docker/setup-buildx-action@v3
8390

@@ -102,3 +109,4 @@ jobs:
102109
build-args: ${{ inputs.build-args }}
103110
file: ${{ env.FILE }}
104111
secrets: ${{ inputs.secrets }}
112+
platforms: ${{ inputs.platforms }}

.github/workflows/tests.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ jobs:
2020
secrets: |
2121
my_secret=toto
2222
my_other_secret=tata
23+
docker-build-platforms:
24+
uses: ./.github/workflows/docker-build.yaml
25+
with:
26+
context: tests/docker
27+
name: test-platform
28+
platforms: linux/amd64,linux/arm64
2329

2430
trivy:
2531
needs: docker-build

0 commit comments

Comments
 (0)