File tree 3 files changed +21
-13
lines changed
3 files changed +21
-13
lines changed Original file line number Diff line number Diff line change 15
15
test :
16
16
runs-on : ubuntu-latest
17
17
steps :
18
- -
19
- name : Checkout
20
- uses : actions/checkout@v4
21
18
-
22
19
name : Test
23
- uses : docker/bake-action@v5
20
+ uses : docker/bake-action@v6
24
21
with :
25
22
targets : test
26
23
-
Original file line number Diff line number Diff line change @@ -15,16 +15,17 @@ jobs:
15
15
prepare :
16
16
runs-on : ubuntu-latest
17
17
outputs :
18
- targets : ${{ steps.targets .outputs.matrix }}
18
+ targets : ${{ steps.generate .outputs.targets }}
19
19
steps :
20
20
-
21
21
name : Checkout
22
22
uses : actions/checkout@v4
23
23
-
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
28
29
29
30
validate :
30
31
runs-on : ubuntu-latest
35
36
matrix :
36
37
target : ${{ fromJson(needs.prepare.outputs.targets) }}
37
38
steps :
38
- -
39
- name : Checkout
40
- uses : actions/checkout@v4
41
39
-
42
40
name : Validate
43
- uses : docker/bake-action@v5
41
+ uses : docker/bake-action@v6
44
42
with :
45
43
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
}
@@ -11,42 +17,49 @@ group "validate" {
11
17
}
12
18
13
19
target "build" {
20
+ inherits = [" _common" ]
14
21
dockerfile = " dev.Dockerfile"
15
22
target = " build-update"
16
23
output = [" ." ]
17
24
}
18
25
19
26
target "build-validate" {
27
+ inherits = [" _common" ]
20
28
dockerfile = " dev.Dockerfile"
21
29
target = " build-validate"
22
30
output = [" type=cacheonly" ]
23
31
}
24
32
25
33
target "format" {
34
+ inherits = [" _common" ]
26
35
dockerfile = " dev.Dockerfile"
27
36
target = " format-update"
28
37
output = [" ." ]
29
38
}
30
39
31
40
target "lint" {
41
+ inherits = [" _common" ]
32
42
dockerfile = " dev.Dockerfile"
33
43
target = " lint"
34
44
output = [" type=cacheonly" ]
35
45
}
36
46
37
47
target "vendor" {
48
+ inherits = [" _common" ]
38
49
dockerfile = " dev.Dockerfile"
39
50
target = " vendor-update"
40
51
output = [" ." ]
41
52
}
42
53
43
54
target "vendor-validate" {
55
+ inherits = [" _common" ]
44
56
dockerfile = " dev.Dockerfile"
45
57
target = " vendor-validate"
46
58
output = [" type=cacheonly" ]
47
59
}
48
60
49
61
target "test" {
62
+ inherits = [" _common" ]
50
63
dockerfile = " dev.Dockerfile"
51
64
target = " test-coverage"
52
65
output = [" ./coverage" ]
You can’t perform that action at this time.
0 commit comments