Skip to content

Commit

Permalink
Add different runner support
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmet committed Oct 29, 2024
1 parent ed4a388 commit 8b4213f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ on:
platforms:
required: false
type: string
runner:
required: false
type: string
default: ubuntu-latest
secrets:
REGISTRY_LOGIN:
required: false
Expand All @@ -74,7 +78,7 @@ jobs:
REGISTRY_LOGIN: "${{ secrets.REGISTRY_LOGIN || github.repository_owner }}"
REGISTRY_PASSWORD: "${{ secrets.REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}"
FILE: ${{ inputs.file || format('{0}/Dockerfile', inputs.context) }}
runs-on: ubuntu-latest
runs-on: ${{ inputs.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -83,10 +87,11 @@ jobs:

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: inputs.platforms
if: inputs.platforms && !contains(inputs.runner, 'windows')

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
if: !contains(inputs.runner, 'windows')

- name: Login to ${{ inputs.registry }}
uses: docker/login-action@v3
Expand Down

0 comments on commit 8b4213f

Please sign in to comment.