Skip to content

Commit 9b60818

Browse files
fix: use v1.3.3 k8s-dqlite patch release 1.32-strict, fix sarif CI (#5168)
* fix: use v1.3.3 k8s-dqlite patch release * fix: upload sarif files sequentially with category set to their basename (#5156)
1 parent b67fe11 commit 9b60818

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

.github/workflows/build-snap.yml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ jobs:
168168
169169
security-scan:
170170
name: Security scan
171+
outputs:
172+
sarif_files: ${{ steps.get_sarif_files.outputs.sarif-files }}
171173
runs-on: ubuntu-latest
172174
needs: build
173175
timeout-minutes: 30
@@ -198,7 +200,41 @@ jobs:
198200
cp build/microk8s.snap .
199201
unsquashfs microk8s.snap
200202
trivy rootfs ./squashfs-root/ --format sarif > sarifs/snap.sarif
201-
- name: Upload Trivy scan results to GitHub Security tab
203+
- name: Generate list of SARIF files
204+
id: get_sarif_files
205+
run: |
206+
sarif_files=$(find sarifs -name "*.sarif" -printf "%P\n" | jq -R -s -c 'split("\n") | map(select(length > 0))')
207+
echo "sarif-files=$sarif_files" >> "$GITHUB_OUTPUT"
208+
- name: Upload SARIF files artifact
209+
uses: actions/upload-artifact@v4
210+
with:
211+
name: sarifs
212+
path: sarifs
213+
retention-days: 1
214+
215+
upload_sarifs_matrix:
216+
needs: security-scan
217+
runs-on: ubuntu-latest
218+
strategy:
219+
fail-fast: true
220+
matrix:
221+
sarif_file_path: ${{ fromJson(needs.security-scan.outputs.sarif_files) }}
222+
steps:
223+
- name: Checkout repository
224+
uses: actions/checkout@v4
225+
- name: Download SARIF files artifact
226+
uses: actions/download-artifact@v4
227+
with:
228+
name: sarifs
229+
path: sarifs
230+
- name: Prepare SARIF category
231+
id: prepare_category
232+
run: |
233+
sarif_file="${{ matrix.sarif_file_path }}"
234+
base_name=$(basename "$sarif_file" .sarif)
235+
echo "category=$base_name" >> "$GITHUB_OUTPUT"
236+
- name: Upload SARIF file
202237
uses: github/codeql-action/upload-sarif@v3
203238
with:
204-
sarif_file: "sarifs"
239+
sarif_file: sarifs/${{ matrix.sarif_file_path }}
240+
category: ${{ steps.prepare_category.outputs.category }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
echo "v1.3.1"
3+
echo "v1.3.3"

0 commit comments

Comments
 (0)