Skip to content

Commit c34f35d

Browse files
authored
Merge pull request #236 from crazy-max/bake-v6
ci: update to bake-action v6
2 parents af3f6ab + f905ba6 commit c34f35d

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

.github/workflows/validate.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@ jobs:
2323
prepare:
2424
runs-on: ubuntu-latest
2525
outputs:
26-
targets: ${{ steps.targets.outputs.matrix }}
26+
targets: ${{ steps.generate.outputs.targets }}
2727
steps:
2828
-
2929
name: Checkout
3030
uses: actions/checkout@v4
3131
-
32-
name: Targets matrix
33-
id: targets
34-
run: |
35-
echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT
32+
name: List targets
33+
id: generate
34+
uses: docker/bake-action/subaction/list-targets@v6
35+
with:
36+
target: validate
3637

3738
validate:
3839
runs-on: ubuntu-latest
@@ -43,11 +44,8 @@ jobs:
4344
matrix:
4445
target: ${{ fromJson(needs.prepare.outputs.targets) }}
4546
steps:
46-
-
47-
name: Checkout
48-
uses: actions/checkout@v4
4947
-
5048
name: Validate
51-
uses: docker/bake-action@v5
49+
uses: docker/bake-action@v6
5250
with:
5351
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)