Skip to content

Commit

Permalink
Support platforms as input for docker-build (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmet authored Oct 30, 2024
1 parent 5b59c79 commit b4ac57e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ on:
secrets:
required: false
type: string
platforms:
required: false
type: string
secrets:
REGISTRY_LOGIN:
required: false
Expand All @@ -78,6 +81,10 @@ jobs:
with:
lfs: ${{ inputs.lfs }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: inputs.platforms

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand All @@ -102,3 +109,4 @@ jobs:
build-args: ${{ inputs.build-args }}
file: ${{ env.FILE }}
secrets: ${{ inputs.secrets }}
platforms: ${{ inputs.platforms }}
6 changes: 6 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:
secrets: |
my_secret=toto
my_other_secret=tata
docker-build-platforms:
uses: ./.github/workflows/docker-build.yaml
with:
context: tests/docker
name: test-platform
platforms: linux/amd64,linux/arm64

trivy:
needs: docker-build
Expand Down

0 comments on commit b4ac57e

Please sign in to comment.