Skip to content

Commit

Permalink
Merge pull request #672 from crazy-max/fix-ci-dispatch
Browse files Browse the repository at this point in the history
ci: fix workflow dispatch inputs
  • Loading branch information
crazy-max authored Aug 17, 2022
2 parents 1527803 + 08aa123 commit 965c6a4
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 35 deletions.
70 changes: 37 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ on:
branches:
- 'master'

env:
BUILDX_VERSION: latest
BUILDKIT_IMAGE: moby/buildkit:buildx-stable-1

jobs:
minimal:
runs-on: ubuntu-latest
Expand All @@ -31,9 +35,9 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
uses: ./action
Expand Down Expand Up @@ -61,10 +65,10 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
network=host
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build and push
id: docker_build
Expand Down Expand Up @@ -110,10 +114,10 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
network=host
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build and push
id: docker_build
Expand Down Expand Up @@ -167,10 +171,10 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
network=host
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build and push
id: docker_build
Expand Down Expand Up @@ -235,9 +239,9 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
id: docker_build
Expand Down Expand Up @@ -308,9 +312,9 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: List networks
run: docker network ls
Expand All @@ -332,9 +336,9 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
uses: ./
Expand All @@ -354,10 +358,10 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
network=host
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
uses: ./
Expand All @@ -379,10 +383,10 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
network=host
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
uses: ./
Expand All @@ -402,10 +406,10 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
network=host
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
uses: ./
Expand All @@ -427,9 +431,9 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
uses: ./
Expand All @@ -450,9 +454,9 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
uses: ./
Expand Down Expand Up @@ -489,10 +493,10 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
network=host
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build and push
id: docker_build
Expand Down Expand Up @@ -560,7 +564,7 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver: ${{ matrix.driver }}
driver-opts: |
network=host
Expand Down Expand Up @@ -625,10 +629,10 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
network=host
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build and push (1)
id: docker_build
Expand Down Expand Up @@ -712,10 +716,10 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
network=host
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
buildkitd-flags: --debug
-
name: Build and push
Expand Down Expand Up @@ -749,10 +753,10 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
network=host
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Build
uses: ./
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
tags:
- v*

env:
BUILDX_VERSION: latest
BUILDKIT_IMAGE: moby/buildkit:buildx-stable-1

jobs:
docker:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -83,9 +87,9 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: ${{ matrix.buildx-version }}
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
driver-opts: |
${{ matrix.buildkit-image }}
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
name: Login to Registry
if: github.event_name != 'pull_request'
Expand Down

0 comments on commit 965c6a4

Please sign in to comment.