Skip to content

Commit 083f676

Browse files
crazy-maxglours
authored andcommitted
ci: update bake-action to v6
Signed-off-by: CrazyMax <[email protected]>
1 parent e81de10 commit 083f676

File tree

2 files changed

+33
-39
lines changed

2 files changed

+33
-39
lines changed

.github/workflows/ci.yml

+24-27
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ jobs:
7676
run: |
7777
platform=${{ matrix.platform }}
7878
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
79-
-
80-
name: Checkout
81-
uses: actions/checkout@v4
8279
-
8380
name: Set up QEMU
8481
uses: docker/setup-qemu-action@v3
@@ -87,7 +84,7 @@ jobs:
8784
uses: docker/setup-buildx-action@v3
8885
-
8986
name: Build
90-
uses: docker/bake-action@v5
87+
uses: docker/bake-action@v6
9188
with:
9289
targets: release
9390
set: |
@@ -105,15 +102,12 @@ jobs:
105102
test:
106103
runs-on: ubuntu-latest
107104
steps:
108-
-
109-
name: Checkout
110-
uses: actions/checkout@v4
111105
-
112106
name: Set up Docker Buildx
113107
uses: docker/setup-buildx-action@v3
114108
-
115109
name: Test
116-
uses: docker/bake-action@v5
110+
uses: docker/bake-action@v6
117111
with:
118112
targets: test
119113
set: |
@@ -149,70 +143,73 @@ jobs:
149143
mode=${{ matrix.mode }}
150144
engine=${{ matrix.engine }}
151145
echo "MODE_ENGINE_PAIR=${mode}-${engine}" >> $GITHUB_ENV
152-
-
153-
name: Checkout
146+
147+
- name: Checkout
154148
uses: actions/checkout@v4
149+
155150
- name: Install Docker ${{ matrix.engine }}
156151
run: |
157152
sudo systemctl stop docker.service
158153
sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin
159154
sudo apt-get install curl
160155
curl -fsSL https://test.docker.com -o get-docker.sh
161156
sudo sh ./get-docker.sh --version ${{ matrix.engine }}
157+
162158
- name: Check Docker Version
163159
run: docker --version
164-
-
165-
name: Set up Docker Buildx
160+
161+
- name: Set up Docker Buildx
166162
uses: docker/setup-buildx-action@v3
167-
-
168-
name: Set up Go
163+
164+
- name: Set up Go
169165
uses: actions/setup-go@v5
170166
with:
171167
go-version-file: 'go.mod'
172168
check-latest: true
173169
cache: true
174-
-
175-
name: Build
176-
uses: docker/bake-action@v5
170+
171+
- name: Build
172+
uses: docker/bake-action@v6
177173
with:
174+
source: .
178175
targets: binary-with-coverage
179176
set: |
180177
*.cache-from=type=gha,scope=binary-linux-amd64
181178
*.cache-from=type=gha,scope=binary-e2e-${{ matrix.mode }}
182179
*.cache-to=type=gha,scope=binary-e2e-${{ matrix.mode }},mode=max
183180
env:
184181
BUILD_TAGS: e2e
185-
-
186-
name: Setup tmate session
182+
183+
- name: Setup tmate session
187184
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
188185
uses: mxschmitt/action-tmate@8b4e4ac71822ed7e0ad5fb3d1c33483e9e8fb270 # v3.11
189186
with:
190187
limit-access-to-actor: true
191188
github-token: ${{ secrets.GITHUB_TOKEN }}
192-
-
193-
name: Test plugin mode
189+
190+
- name: Test plugin mode
194191
if: ${{ matrix.mode == 'plugin' }}
195192
run: |
196193
rm -rf ./bin/coverage/e2e
197194
mkdir -p ./bin/coverage/e2e
198195
make e2e-compose GOCOVERDIR=bin/coverage/e2e TEST_FLAGS="-v"
199-
-
200-
name: Gather coverage data
196+
197+
- name: Gather coverage data
201198
if: ${{ matrix.mode == 'plugin' }}
202199
uses: actions/upload-artifact@v4
203200
with:
204201
name: coverage-data-e2e-${{ env.MODE_ENGINE_PAIR }}
205202
path: bin/coverage/e2e/
206203
if-no-files-found: error
207-
-
208-
name: Test standalone mode
204+
205+
- name: Test standalone mode
209206
if: ${{ matrix.mode == 'standalone' }}
210207
run: |
211208
rm -f /usr/local/bin/docker-compose
212209
cp bin/build/docker-compose /usr/local/bin
213210
make e2e-compose-standalone
214-
-
215-
name: e2e Test Summary
211+
212+
- name: e2e Test Summary
216213
uses: test-summary/action@v2
217214
with:
218215
paths: /tmp/report/report.xml

.github/workflows/merge.yml

+9-12
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,12 @@ jobs:
8080
digest: ${{ fromJSON(steps.bake.outputs.metadata).image-cross['containerimage.digest'] }}
8181
steps:
8282
-
83-
name: Checkout
84-
uses: actions/checkout@v4
83+
name: Login to DockerHub
84+
if: github.event_name != 'pull_request'
85+
uses: docker/login-action@v3
86+
with:
87+
username: ${{ secrets.DOCKERPUBLICBOT_USERNAME }}
88+
password: ${{ secrets.DOCKERPUBLICBOT_WRITE_PAT }}
8589
-
8690
name: Set up QEMU
8791
uses: docker/setup-qemu-action@v3
@@ -99,28 +103,21 @@ jobs:
99103
type=ref,event=tag
100104
type=edge
101105
bake-target: meta-helper
102-
-
103-
name: Login to DockerHub
104-
if: github.event_name != 'pull_request'
105-
uses: docker/login-action@v3
106-
with:
107-
username: ${{ secrets.DOCKERPUBLICBOT_USERNAME }}
108-
password: ${{ secrets.DOCKERPUBLICBOT_WRITE_PAT }}
109106
-
110107
name: Build and push image
111108
uses: docker/bake-action@v5
112109
id: bake
113110
with:
114111
files: |
115112
./docker-bake.hcl
116-
${{ steps.meta.outputs.bake-file }}
113+
cwd://${{ steps.meta.outputs.bake-file }}
117114
targets: image-cross
118115
push: ${{ github.event_name != 'pull_request' }}
116+
sbom: true
117+
provenance: mode=max
119118
set: |
120119
*.cache-from=type=gha,scope=bin-image
121120
*.cache-to=type=gha,scope=bin-image,mode=max
122-
*.attest=type=sbom
123-
*.attest=type=provenance,mode=max,builder-id=https://github.com/${{ env.GITHUB_REPOSITORY }}/actions/runs/${{ env.GITHUB_RUN_ID }}
124121
125122
desktop-edge-test:
126123
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)