Skip to content

Commit bf7e9e9

Browse files
authored
Merge pull request #427 from crazy-max/bake-v6
ci: update bake-action to v6
2 parents 406ed84 + 6b13140 commit bf7e9e9

File tree

3 files changed

+33
-22
lines changed

3 files changed

+33
-22
lines changed

.github/workflows/build.yml

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -50,7 +55,7 @@ jobs:
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
@@ -60,8 +65,9 @@ jobs:
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:
@@ -77,8 +83,9 @@ jobs:
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 }}

.github/workflows/docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ jobs:
3636
uses: docker/setup-buildx-action@v3
3737
-
3838
name: Build docs
39-
uses: docker/bake-action@v5
39+
uses: docker/bake-action@v6
4040
with:
41+
source: .
4142
provenance: false
4243
targets: docs
4344
-

.github/workflows/e2e.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ jobs:
3333
uses: actions/checkout@v4
3434
-
3535
name: Build
36-
uses: docker/bake-action@v5
36+
uses: docker/bake-action@v6
3737
with:
38+
source: .
3839
provenance: false
3940
targets: image-local
40-
pull: true
4141
-
4242
name: Create network
4343
run: |

0 commit comments

Comments
 (0)