Merge pull request #5737 from crazy-max/bake-v6

ci: update bake-action to v6
This commit is contained in:
Sebastiaan van Stijn 2025-01-10 20:26:52 +01:00 committed by GitHub
commit 4e217ae9c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 15 additions and 29 deletions

View File

@ -61,17 +61,12 @@ jobs:
- "" - ""
- glibc - glibc
steps: steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- -
name: Build name: Build
uses: docker/bake-action@v5 uses: docker/bake-action@v6
with: with:
targets: ${{ matrix.target }} targets: ${{ matrix.target }}
set: | set: |
@ -104,8 +99,12 @@ jobs:
if: ${{ github.event_name != 'pull_request' && github.repository == 'docker/cli' }} if: ${{ github.event_name != 'pull_request' && github.repository == 'docker/cli' }}
steps: steps:
- -
name: Checkout name: Login to DockerHub
uses: actions/checkout@v4 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 name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
@ -123,20 +122,13 @@ jobs:
type=ref,event=branch type=ref,event=branch
type=ref,event=pr type=ref,event=pr
type=sha 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 name: Build and push image
uses: docker/bake-action@v5 uses: docker/bake-action@v6
with: with:
files: | files: |
./docker-bake.hcl ./docker-bake.hcl
${{ steps.meta.outputs.bake-file }} cwd://${{ steps.meta.outputs.bake-file }}
targets: bin-image-cross targets: bin-image-cross
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
set: | set: |
@ -170,15 +162,12 @@ jobs:
matrix: matrix:
platform: ${{ fromJson(needs.prepare-plugins.outputs.matrix) }} platform: ${{ fromJson(needs.prepare-plugins.outputs.matrix) }}
steps: steps:
-
name: Checkout
uses: actions/checkout@v4
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- -
name: Build name: Build
uses: docker/bake-action@v5 uses: docker/bake-action@v6
with: with:
targets: plugins-cross targets: plugins-cross
set: | set: |

View File

@ -27,15 +27,12 @@ jobs:
ctn: ctn:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
-
name: Checkout
uses: actions/checkout@v4
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- -
name: Test name: Test
uses: docker/bake-action@v5 uses: docker/bake-action@v6
with: with:
targets: test-coverage targets: test-coverage
- -

View File

@ -35,12 +35,9 @@ jobs:
- validate-vendor - validate-vendor
- update-authors # ensure authors update target runs fine - update-authors # ensure authors update target runs fine
steps: steps:
-
name: Checkout
uses: actions/checkout@v4
- -
name: Run name: Run
uses: docker/bake-action@v5 uses: docker/bake-action@v6
with: with:
targets: ${{ matrix.target }} targets: ${{ matrix.target }}

View File

@ -141,16 +141,19 @@ target "update-authors" {
} }
target "test" { target "test" {
inherits = ["_common"]
target = "test" target = "test"
output = ["type=cacheonly"] output = ["type=cacheonly"]
} }
target "test-coverage" { target "test-coverage" {
inherits = ["_common"]
target = "test-coverage" target = "test-coverage"
output = ["build/coverage"] output = ["build/coverage"]
} }
target "e2e-image" { target "e2e-image" {
inherits = ["_common"]
target = "e2e" target = "e2e"
output = ["type=docker"] output = ["type=docker"]
tags = ["${IMAGE_NAME}"] tags = ["${IMAGE_NAME}"]