Skip to content

Commit af2ed95

Browse files
authored
Merge pull request #61 from crazy-max/bake-v6
ci: update bake-action to v6
2 parents 3cb05d8 + 86b8b30 commit af2ed95

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

.github/workflows/validate.yml

Lines changed: 7 additions & 9 deletions
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

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)