ci: update bake-action to v6 (#493)

This commit is contained in:
CrazyMax
2025-03-30 13:08:41 +02:00
committed by GitHub
parent 73c477b761
commit 9c156ee8a1
4 changed files with 19 additions and 12 deletions
+3 -3
View File
@@ -24,7 +24,7 @@ jobs:
matrix: matrix:
os: os:
- ubuntu-latest - ubuntu-latest
- macOS-latest - macos-latest
- windows-latest - windows-latest
version: version:
- latest - latest
@@ -108,7 +108,7 @@ jobs:
matrix: matrix:
os: os:
- ubuntu-latest - ubuntu-latest
- macOS-latest - macos-latest
- windows-latest - windows-latest
steps: steps:
- -
@@ -210,7 +210,7 @@ jobs:
matrix: matrix:
os: os:
- ubuntu-latest - ubuntu-latest
- macOS-latest - macos-latest
- windows-latest - windows-latest
distribution: distribution:
- goreleaser-pro - goreleaser-pro
+1
View File
@@ -24,6 +24,7 @@ jobs:
name: Test name: Test
uses: docker/bake-action@v6 uses: docker/bake-action@v6
with: with:
source: .
targets: test targets: test
- -
name: Upload coverage name: Upload coverage
+7 -9
View File
@@ -15,16 +15,17 @@ jobs:
prepare: prepare:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
targets: ${{ steps.targets.outputs.matrix }} targets: ${{ steps.generate.outputs.targets }}
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- -
name: Targets matrix name: List targets
id: targets id: generate
run: | uses: docker/bake-action/subaction/list-targets@v6
echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT with:
target: validate
validate: validate:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -35,11 +36,8 @@ jobs:
matrix: matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }} target: ${{ fromJson(needs.prepare.outputs.targets) }}
steps: steps:
-
name: Checkout
uses: actions/checkout@v4
- -
name: Validate name: Validate
uses: docker/bake-action@v5 uses: docker/bake-action@v6
with: with:
targets: ${{ matrix.target }} targets: ${{ matrix.target }}
+8
View File
@@ -1,3 +1,9 @@
target "_common" {
args = {
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
}
}
group "default" { group "default" {
targets = ["build"] targets = ["build"]
} }
@@ -17,6 +23,7 @@ target "build" {
} }
target "build-validate" { target "build-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile" dockerfile = "dev.Dockerfile"
target = "build-validate" target = "build-validate"
output = ["type=cacheonly"] output = ["type=cacheonly"]
@@ -41,6 +48,7 @@ target "vendor" {
} }
target "vendor-validate" { target "vendor-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile" dockerfile = "dev.Dockerfile"
target = "vendor-validate" target = "vendor-validate"
output = ["type=cacheonly"] output = ["type=cacheonly"]