Skip to content

Commit b70aa9b

Browse files
committed
ci: update bake-action to v6
1 parent d690cc9 commit b70aa9b

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- true
4545
os:
4646
- ubuntu-latest
47-
- macOS-latest
47+
- macos-latest
4848
- windows-latest
4949
include:
5050
- key: test-subkey
@@ -105,7 +105,7 @@ jobs:
105105
- test-subkey
106106
os:
107107
- ubuntu-latest
108-
- macOS-latest
108+
- macos-latest
109109
- windows-latest
110110
include:
111111
- key: test-subkey
@@ -151,7 +151,7 @@ jobs:
151151
- 1
152152
os:
153153
- ubuntu-latest
154-
- macOS-latest
154+
- macos-latest
155155
- windows-latest
156156
steps:
157157
-

.github/workflows/test.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ jobs:
2424
uses: actions/checkout@v4
2525
-
2626
name: Test
27-
uses: docker/bake-action@v5
27+
uses: docker/bake-action@v6
2828
with:
29+
source: .
2930
targets: test
3031
-
3132
name: Upload coverage

.github/workflows/validate.yml

+7-9
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,17 @@ jobs:
1919
prepare:
2020
runs-on: ubuntu-latest
2121
outputs:
22-
targets: ${{ steps.targets.outputs.matrix }}
22+
targets: ${{ steps.generate.outputs.targets }}
2323
steps:
2424
-
2525
name: Checkout
2626
uses: actions/checkout@v4
2727
-
28-
name: Targets matrix
29-
id: targets
30-
run: |
31-
echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT
28+
name: List targets
29+
id: generate
30+
uses: docker/bake-action/subaction/list-targets@v6
31+
with:
32+
target: validate
3233

3334
validate:
3435
runs-on: ubuntu-latest
@@ -39,11 +40,8 @@ jobs:
3940
matrix:
4041
target: ${{ fromJson(needs.prepare.outputs.targets) }}
4142
steps:
42-
-
43-
name: Checkout
44-
uses: actions/checkout@v4
4543
-
4644
name: Validate
47-
uses: docker/bake-action@v5
45+
uses: docker/bake-action@v6
4846
with:
4947
targets: ${{ matrix.target }}

docker-bake.hcl

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
target "_common" {
2+
args = {
3+
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
4+
}
5+
}
6+
17
group "default" {
28
targets = ["build"]
39
}
@@ -17,6 +23,7 @@ target "build" {
1723
}
1824

1925
target "build-validate" {
26+
inherits = ["_common"]
2027
dockerfile = "dev.Dockerfile"
2128
target = "build-validate"
2229
output = ["type=cacheonly"]
@@ -41,6 +48,7 @@ target "vendor" {
4148
}
4249

4350
target "vendor-validate" {
51+
inherits = ["_common"]
4452
dockerfile = "dev.Dockerfile"
4553
target = "vendor-validate"
4654
output = ["type=cacheonly"]

0 commit comments

Comments
 (0)