Skip to content

Commit

Permalink
Merge pull request docker#5737 from crazy-max/bake-v6
Browse files Browse the repository at this point in the history
ci: update bake-action to v6
  • Loading branch information
thaJeztah authored Jan 10, 2025
2 parents 8e365dd + cc57190 commit 4e217ae
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 29 deletions.
31 changes: 10 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,12 @@ jobs:
- ""
- glibc
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
targets: ${{ matrix.target }}
set: |
Expand Down Expand Up @@ -104,8 +99,12 @@ jobs:
if: ${{ github.event_name != 'pull_request' && github.repository == 'docker/cli' }}
steps:
-
name: Checkout
uses: actions/checkout@v4
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_CLIBIN_USERNAME }}
password: ${{ secrets.DOCKERHUB_CLIBIN_TOKEN }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -123,20 +122,13 @@ jobs:
type=ref,event=branch
type=ref,event=pr
type=sha
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_CLIBIN_USERNAME }}
password: ${{ secrets.DOCKERHUB_CLIBIN_TOKEN }}
-
name: Build and push image
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
files: |
./docker-bake.hcl
${{ steps.meta.outputs.bake-file }}
cwd://${{ steps.meta.outputs.bake-file }}
targets: bin-image-cross
push: ${{ github.event_name != 'pull_request' }}
set: |
Expand Down Expand Up @@ -170,15 +162,12 @@ jobs:
matrix:
platform: ${{ fromJson(needs.prepare-plugins.outputs.matrix) }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
targets: plugins-cross
set: |
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@ jobs:
ctn:
runs-on: ubuntu-24.04
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Test
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
targets: test-coverage
-
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ jobs:
- validate-vendor
- update-authors # ensure authors update target runs fine
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Run
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
targets: ${{ matrix.target }}

Expand Down
3 changes: 3 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,19 @@ target "update-authors" {
}

target "test" {
inherits = ["_common"]
target = "test"
output = ["type=cacheonly"]
}

target "test-coverage" {
inherits = ["_common"]
target = "test-coverage"
output = ["build/coverage"]
}

target "e2e-image" {
inherits = ["_common"]
target = "e2e"
output = ["type=docker"]
tags = ["${IMAGE_NAME}"]
Expand Down

0 comments on commit 4e217ae

Please sign in to comment.