@@ -26,22 +26,27 @@ jobs:
2626 prepare :
2727 runs-on : ubuntu-latest
2828 outputs :
29- validate-targets : ${{ steps.validate-targets .outputs.matrix }}
30- artifact-platforms : ${{ steps.artifact-platforms .outputs.matrix }}
29+ validate-includes : ${{ steps.validate.outputs.matrix }}
30+ artifact-includes : ${{ steps.artifact.outputs.matrix }}
3131 steps :
3232 -
3333 name : Checkout
3434 uses : actions/checkout@v4
3535 -
36- name : Validate targets matrix
37- id : validate-targets
38- run : |
39- echo "matrix=$(docker buildx bake validate --print | jq -cr '.target | keys')" >> $GITHUB_OUTPUT
36+ name : Validate matrix
37+ id : validate
38+ uses : docker/bake-action/subaction/matrix@v6
39+ with :
40+ target : validate
41+ env :
42+ GOLANGCI_LINT_MULTIPLATFORM : 1
4043 -
41- name : Artifact platforms matrix
42- id : artifact-platforms
43- run : |
44- echo "matrix=$(docker buildx bake artifact-all --print | jq -cr '.target."artifact-all".platforms')" >> $GITHUB_OUTPUT
44+ name : Artifact matrix
45+ id : artifact
46+ uses : docker/bake-action/subaction/matrix@v6
47+ with :
48+ target : artifact-all
49+ fields : platforms
4550
4651 validate :
4752 runs-on : ubuntu-latest
5055 strategy :
5156 fail-fast : false
5257 matrix :
53- target : ${{ fromJson(needs.prepare.outputs.validate-targets ) }}
58+ include : ${{ fromJson(needs.prepare.outputs.validate-includes ) }}
5459 steps :
5560 -
5661 name : Checkout
6065 uses : docker/setup-buildx-action@v3
6166 -
6267 name : Validate
63- uses : docker/bake-action@v5
68+ uses : docker/bake-action@v6
6469 with :
70+ source : .
6571 targets : ${{ matrix.target }}
6672
6773 test :
7783 uses : docker/setup-buildx-action@v3
7884 -
7985 name : Test
80- uses : docker/bake-action@v5
86+ uses : docker/bake-action@v6
8187 with :
88+ source : .
8289 targets : test
8390 pull : true
8491 -
@@ -96,12 +103,12 @@ jobs:
96103 strategy :
97104 fail-fast : false
98105 matrix :
99- platform : ${{ fromJson(needs.prepare.outputs.artifact-platforms ) }}
106+ include : ${{ fromJson(needs.prepare.outputs.artifact-includes ) }}
100107 steps :
101108 -
102109 name : Prepare
103110 run : |
104- platform=${{ matrix.platform }}
111+ platform=${{ matrix.platforms }}
105112 echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
106113 -
107114 name : Checkout
@@ -116,14 +123,15 @@ jobs:
116123 uses : docker/setup-buildx-action@v3
117124 -
118125 name : Build
119- uses : docker/bake-action@v5
126+ uses : docker/bake-action@v6
120127 with :
128+ source : .
121129 targets : artifact
122130 provenance : mode=max
123131 sbom : true
124132 pull : true
125133 set : |
126- *.platform=${{ matrix.platform }}
134+ *.platform=${{ matrix.platforms }}
127135 -
128136 name : Rename provenance and sbom
129137 working-directory : ${{ env.DESTDIR }}/artifact
@@ -173,8 +181,9 @@ jobs:
173181 uses : docker/setup-buildx-action@v3
174182 -
175183 name : Build
176- uses : docker/bake-action@v5
184+ uses : docker/bake-action@v6
177185 with :
186+ source : .
178187 targets : release
179188 provenance : false
180189 -
@@ -245,8 +254,9 @@ jobs:
245254 password : ${{ secrets.GITHUB_TOKEN }}
246255 -
247256 name : Build
248- uses : docker/bake-action@v5
257+ uses : docker/bake-action@v6
249258 with :
259+ source : .
250260 files : |
251261 ./docker-bake.hcl
252262 ${{ steps.meta.outputs.bake-file }}
0 commit comments