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:
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
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 }}
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+
17group "default" {
28 targets = [" build" ]
39}
@@ -17,6 +23,7 @@ target "build" {
1723}
1824
1925target "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
4350target "vendor-validate" {
51+ inherits = [" _common" ]
4452 dockerfile = " dev.Dockerfile"
4553 target = " vendor-validate"
4654 output = [" type=cacheonly" ]
You can’t perform that action at this time.
0 commit comments