From b165f3a2d51d93ee90f90ada41ab10042eff4d03 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Wed, 8 Jan 2025 13:31:11 +0100 Subject: [PATCH] update bake-action to v6 Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- .github/workflows/.test.yml | 11 +++-------- .github/workflows/buildkit.yml | 7 +------ .github/workflows/test-os.yml | 10 ++-------- .github/workflows/validate.yml | 21 ++++++++------------- docker-bake.hcl | 1 + 5 files changed, 15 insertions(+), 35 deletions(-) diff --git a/.github/workflows/.test.yml b/.github/workflows/.test.yml index 38f203272649..9ca033c5481d 100644 --- a/.github/workflows/.test.yml +++ b/.github/workflows/.test.yml @@ -40,12 +40,6 @@ jobs: tags: ${{ steps.set.outputs.tags }} includes: ${{ steps.set.outputs.includes }} steps: - - - name: Checkout - uses: actions/checkout@v4 - - - name: Expose GitHub Runtime - uses: crazy-max/ghaction-github-runtime@v3 - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -89,7 +83,7 @@ jobs: }); - name: Build - uses: docker/bake-action@v5 + uses: docker/bake-action@v6 with: targets: integration-tests-base set: | @@ -155,8 +149,9 @@ jobs: buildkitd-flags: --debug - name: Build test image - uses: docker/bake-action@v5 + uses: docker/bake-action@v6 with: + source: . targets: integration-tests set: | *.cache-from=type=gha,scope=${{ inputs.cache_scope }} diff --git a/.github/workflows/buildkit.yml b/.github/workflows/buildkit.yml index d7bdaecd0c59..b4f56b3b6007 100644 --- a/.github/workflows/buildkit.yml +++ b/.github/workflows/buildkit.yml @@ -152,11 +152,6 @@ jobs: # required to check out the repository contents: read steps: - - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -166,7 +161,7 @@ jobs: buildkitd-flags: --debug - name: Run - uses: docker/bake-action@v5 + uses: docker/bake-action@v6 with: targets: govulncheck env: diff --git a/.github/workflows/test-os.yml b/.github/workflows/test-os.yml index b6f07584db0e..2c62ef92bddd 100644 --- a/.github/workflows/test-os.yml +++ b/.github/workflows/test-os.yml @@ -39,9 +39,6 @@ jobs: run: | platform=${{ matrix.platform }} echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - - - name: Checkout - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -51,7 +48,7 @@ jobs: buildkitd-flags: --debug - name: Build - uses: docker/bake-action@v5 + uses: docker/bake-action@v6 with: provenance: false targets: binaries-for-test @@ -240,9 +237,6 @@ jobs: - linux/amd64 - linux/arm64 steps: - - - name: Checkout - uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -255,7 +249,7 @@ jobs: buildkitd-flags: --debug - name: Build - uses: docker/bake-action@v5 + uses: docker/bake-action@v6 with: targets: integration-tests-base set: | diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index b8d42834ac89..7d4da9eeb61d 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -23,16 +23,17 @@ jobs: prepare: runs-on: ubuntu-24.04 outputs: - targets: ${{ steps.targets.outputs.matrix }} + targets: ${{ steps.generate.outputs.targets }} steps: - name: Checkout uses: actions/checkout@v4 - - name: Matrix - id: targets - run: | - echo "matrix=$(docker buildx bake validate --print | jq -cr '.target | keys')" >> $GITHUB_OUTPUT + name: List targets + id: generate + uses: docker/bake-action/subaction/list-targets@v6 + with: + target: validate validate: runs-on: ubuntu-24.04 @@ -49,9 +50,6 @@ jobs: if [ "$GITHUB_REPOSITORY" = "moby/buildkit" ]; then echo "GOLANGCI_LINT_MULTIPLATFORM=1" >> $GITHUB_ENV fi - - - name: Checkout - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -61,16 +59,13 @@ jobs: buildkitd-flags: --debug - name: Validate - uses: docker/bake-action@v5 + uses: docker/bake-action@v6 with: targets: ${{ matrix.target }} archutil-arm64: runs-on: ubuntu-24.04 steps: - - - name: Checkout - uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -83,7 +78,7 @@ jobs: buildkitd-flags: --debug - name: Validate - uses: docker/bake-action@v5 + uses: docker/bake-action@v6 with: targets: validate-archutil set: | diff --git a/docker-bake.hcl b/docker-bake.hcl index 67d9df39a09b..350fda4fcd58 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -268,6 +268,7 @@ target "validate-dockerfile" { ] } name = "validate-dockerfile-${md5(dockerfile)}" + inherits = ["_common"] dockerfile = dockerfile call = "check" }