Skip to content

Commit e4dc6d7

Browse files
authored
fix: update k8s-dqlite to 1.2.2 (#5309)
* update k8s-dqlite to 1.2.2 * use new sarif uploading format
1 parent 96e8433 commit e4dc6d7

2 files changed

Lines changed: 39 additions & 3 deletions

File tree

.github/workflows/build-snap.yml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ jobs:
156156
157157
security-scan:
158158
name: Security scan
159+
outputs:
160+
sarif_files: ${{ steps.get_sarif_files.outputs.sarif-files }}
159161
runs-on: ubuntu-latest
160162
needs: build
161163
timeout-minutes: 30
@@ -186,7 +188,41 @@ jobs:
186188
cp build/microk8s.snap .
187189
unsquashfs microk8s.snap
188190
trivy rootfs ./squashfs-root/ --format sarif > sarifs/snap.sarif
189-
- name: Upload Trivy scan results to GitHub Security tab
191+
- name: Generate list of SARIF files
192+
id: get_sarif_files
193+
run: |
194+
sarif_files=$(find sarifs -name "*.sarif" -printf "%P\n" | jq -R -s -c 'split("\n") | map(select(length > 0))')
195+
echo "sarif-files=$sarif_files" >> "$GITHUB_OUTPUT"
196+
- name: Upload SARIF files artifact
197+
uses: actions/upload-artifact@v4
198+
with:
199+
name: sarifs
200+
path: sarifs
201+
retention-days: 1
202+
203+
upload_sarifs_matrix:
204+
needs: security-scan
205+
runs-on: ubuntu-latest
206+
strategy:
207+
fail-fast: true
208+
matrix:
209+
sarif_file_path: ${{ fromJson(needs.security-scan.outputs.sarif_files) }}
210+
steps:
211+
- name: Checkout repository
212+
uses: actions/checkout@v4
213+
- name: Download SARIF files artifact
214+
uses: actions/download-artifact@v4
215+
with:
216+
name: sarifs
217+
path: sarifs
218+
- name: Prepare SARIF category
219+
id: prepare_category
220+
run: |
221+
sarif_file="${{ matrix.sarif_file_path }}"
222+
base_name=$(basename "$sarif_file" .sarif)
223+
echo "category=$base_name" >> "$GITHUB_OUTPUT"
224+
- name: Upload SARIF file
190225
uses: github/codeql-action/upload-sarif@v3
191226
with:
192-
sarif_file: "sarifs"
227+
sarif_file: sarifs/${{ matrix.sarif_file_path }}
228+
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.2.1"
3+
echo "v1.2.2"

0 commit comments

Comments
 (0)