Skip to content

Commit 9c156ee

Browse files
authored
ci: update bake-action to v6 (#493)
1 parent 73c477b commit 9c156ee

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
matrix:
2525
os:
2626
- ubuntu-latest
27-
- macOS-latest
27+
- macos-latest
2828
- windows-latest
2929
version:
3030
- latest
@@ -108,7 +108,7 @@ jobs:
108108
matrix:
109109
os:
110110
- ubuntu-latest
111-
- macOS-latest
111+
- macos-latest
112112
- windows-latest
113113
steps:
114114
-
@@ -210,7 +210,7 @@ jobs:
210210
matrix:
211211
os:
212212
- ubuntu-latest
213-
- macOS-latest
213+
- macos-latest
214214
- windows-latest
215215
distribution:
216216
- goreleaser-pro

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
name: Test
2525
uses: docker/bake-action@v6
2626
with:
27+
source: .
2728
targets: test
2829
-
2930
name: Upload coverage

.github/workflows/validate.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ jobs:
1515
prepare:
1616
runs-on: ubuntu-latest
1717
outputs:
18-
targets: ${{ steps.targets.outputs.matrix }}
18+
targets: ${{ steps.generate.outputs.targets }}
1919
steps:
2020
-
2121
name: Checkout
2222
uses: actions/checkout@v4
2323
-
24-
name: Targets matrix
25-
id: targets
26-
run: |
27-
echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT
24+
name: List targets
25+
id: generate
26+
uses: docker/bake-action/subaction/list-targets@v6
27+
with:
28+
target: validate
2829

2930
validate:
3031
runs-on: ubuntu-latest
@@ -35,11 +36,8 @@ jobs:
3536
matrix:
3637
target: ${{ fromJson(needs.prepare.outputs.targets) }}
3738
steps:
38-
-
39-
name: Checkout
40-
uses: actions/checkout@v4
4139
-
4240
name: Validate
43-
uses: docker/bake-action@v5
41+
uses: docker/bake-action@v6
4442
with:
4543
targets: ${{ matrix.target }}

docker-bake.hcl

Lines changed: 8 additions & 0 deletions
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)