Skip to content

Commit 72d8e87

Browse files
authored
Merge pull request #320 from crazy-max/bake-v6
ci: update bake-action to v6
2 parents e15465c + 578d581 commit 72d8e87

File tree

4 files changed

+28
-16
lines changed

4 files changed

+28
-16
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,23 @@ 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-targets: ${{ steps.validate.outputs.targets }}
30+
artifact-platforms: ${{ steps.artifact.outputs.platforms }}
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 targets
37+
id: validate
38+
uses: docker/bake-action/subaction/list-targets@v6
39+
with:
40+
target: validate
4041
-
41-
name: Artifact platforms matrix
42-
id: artifact-platforms
42+
name: Artifact platforms
43+
id: artifact
4344
run: |
44-
echo "matrix=$(docker buildx bake artifact-all --print | jq -cr '.target."artifact-all".platforms')" >> $GITHUB_OUTPUT
45+
echo "platforms=$(docker buildx bake artifact-all --print | jq -cr '.target."artifact-all".platforms')" >> $GITHUB_OUTPUT
4546
4647
validate:
4748
runs-on: ubuntu-latest
@@ -60,8 +61,9 @@ jobs:
6061
uses: docker/setup-buildx-action@v3
6162
-
6263
name: Validate
63-
uses: docker/bake-action@v5
64+
uses: docker/bake-action@v6
6465
with:
66+
source: .
6567
targets: ${{ matrix.target }}
6668

6769
test:
@@ -77,8 +79,9 @@ jobs:
7779
uses: docker/setup-buildx-action@v3
7880
-
7981
name: Test
80-
uses: docker/bake-action@v5
82+
uses: docker/bake-action@v6
8183
with:
84+
source: .
8285
targets: test
8386
pull: true
8487
-
@@ -116,8 +119,9 @@ jobs:
116119
uses: docker/setup-buildx-action@v3
117120
-
118121
name: Build
119-
uses: docker/bake-action@v5
122+
uses: docker/bake-action@v6
120123
with:
124+
source: .
121125
targets: artifact
122126
provenance: mode=max
123127
sbom: true
@@ -173,8 +177,9 @@ jobs:
173177
uses: docker/setup-buildx-action@v3
174178
-
175179
name: Build
176-
uses: docker/bake-action@v5
180+
uses: docker/bake-action@v6
177181
with:
182+
source: .
178183
targets: release
179184
provenance: false
180185
-
@@ -244,8 +249,9 @@ jobs:
244249
password: ${{ secrets.GITHUB_TOKEN }}
245250
-
246251
name: Build
247-
uses: docker/bake-action@v5
252+
uses: docker/bake-action@v6
248253
with:
254+
source: .
249255
files: |
250256
./docker-bake.hcl
251257
${{ 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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ jobs:
5454
uses: docker/setup-buildx-action@v3
5555
-
5656
name: Build
57-
uses: docker/bake-action@v5
57+
uses: docker/bake-action@v6
5858
with:
59+
source: .
5960
targets: binary
6061
-
6162
name: Run
@@ -93,6 +94,7 @@ jobs:
9394
name: Build
9495
uses: docker/bake-action@v5
9596
with:
97+
source: .
9698
targets: binary
9799
-
98100
name: Run
@@ -125,6 +127,7 @@ jobs:
125127
name: Build
126128
uses: docker/bake-action@v5
127129
with:
130+
source: .
128131
targets: binary
129132
-
130133
name: Create Dockerfile
@@ -163,6 +166,7 @@ jobs:
163166
name: Build
164167
uses: docker/bake-action@v5
165168
with:
169+
source: .
166170
targets: binary
167171
-
168172
name: Create docker archive

docker-bake.hcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ variable "GITHUB_REF" {
1414

1515
target "_common" {
1616
args = {
17+
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
1718
GO_VERSION = GO_VERSION
1819
GIT_REF = GITHUB_REF
1920
}

0 commit comments

Comments
 (0)