File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -23,16 +23,17 @@ jobs:
23
23
prepare :
24
24
runs-on : ubuntu-latest
25
25
outputs :
26
- targets : ${{ steps.targets .outputs.matrix }}
26
+ targets : ${{ steps.generate .outputs.targets }}
27
27
steps :
28
28
-
29
29
name : Checkout
30
30
uses : actions/checkout@v4
31
31
-
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
36
37
37
38
validate :
38
39
runs-on : ubuntu-latest
43
44
matrix :
44
45
target : ${{ fromJson(needs.prepare.outputs.targets) }}
45
46
steps :
46
- -
47
- name : Checkout
48
- uses : actions/checkout@v4
49
47
-
50
48
name : Validate
51
- uses : docker/bake-action@v5
49
+ uses : docker/bake-action@v6
52
50
with :
53
51
targets : ${{ matrix.target }}
Original file line number Diff line number Diff line change
1
+ target "_common" {
2
+ args = {
3
+ BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
4
+ }
5
+ }
6
+
1
7
group "default" {
2
8
targets = [" build" ]
3
9
}
@@ -17,6 +23,7 @@ target "build" {
17
23
}
18
24
19
25
target "build-validate" {
26
+ inherits = [" _common" ]
20
27
dockerfile = " dev.Dockerfile"
21
28
target = " build-validate"
22
29
output = [" type=cacheonly" ]
@@ -41,6 +48,7 @@ target "vendor" {
41
48
}
42
49
43
50
target "vendor-validate" {
51
+ inherits = [" _common" ]
44
52
dockerfile = " dev.Dockerfile"
45
53
target = " vendor-validate"
46
54
output = [" type=cacheonly" ]
You can’t perform that action at this time.
0 commit comments