Skip to content

Commit 96873cb

Browse files
committed
kernelCTF: GHA: separate artifact names
1 parent c111d81 commit 96873cb

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed

.github/workflows/kernelctf-submission-verification.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ jobs:
102102
if: success()
103103
uses: actions/upload-artifact@v4
104104
with:
105-
name: exploit_${{ env.RELEASE_ID }}
105+
name: ${{ needs.structure_check.outputs.artifact_backup_dir }}_exploit_${{ env.RELEASE_ID }}
106106
path: ${{ env.EXPLOIT_DIR }}/exploit
107107
if-no-files-found: error
108108

109109
- name: Upload exploit (original, build failed)
110110
if: failure() && steps.build_exploit.outcome == 'failure'
111111
uses: actions/upload-artifact@v4
112112
with:
113-
name: exploit_${{ env.RELEASE_ID }}
113+
name: ${{ needs.structure_check.outputs.artifact_backup_dir }}_exploit_${{ env.RELEASE_ID }}
114114
path: ./exploit
115115
if-no-files-found: error
116116

@@ -161,7 +161,7 @@ jobs:
161161
- name: Upload debug build
162162
uses: actions/upload-artifact@v4
163163
with:
164-
name: exploit_debug_${{ env.RELEASE_ID }}
164+
name: ${{ needs.structure_check.outputs.artifact_backup_dir }}_exploit_debug_${{ env.RELEASE_ID }}
165165
path: ${{ env.EXPLOIT_DIR }}/exploit_debug
166166
if-no-files-found: error
167167

@@ -271,7 +271,7 @@ jobs:
271271
- name: Upload repro QEMU logs as an artifact
272272
uses: actions/upload-artifact@v4
273273
with:
274-
name: repro_logs_${{ env.RELEASE_ID }}
274+
name: ${{ needs.structure_check.outputs.artifact_backup_dir }}_repro_logs_${{ env.RELEASE_ID }}
275275
path: ./kernelctf/repro/repro_log_*.txt
276276

277277
- name: Reproduction // Summary
@@ -284,13 +284,13 @@ jobs:
284284
- name: Upload repro summary as an artifact
285285
uses: actions/upload-artifact@v4
286286
with:
287-
name: repro_summary_${{ env.RELEASE_ID }}
287+
name: ${{ needs.structure_check.outputs.artifact_backup_dir }}_repro_summary_${{ env.RELEASE_ID }}
288288
path: ./kernelctf/repro/repro_summary.md
289289

290290
backup_artifacts:
291291
runs-on: ubuntu-latest
292292
needs: [structure_check, exploit_build, exploit_build_debug, exploit_repro]
293-
if: always() && needs.structure_check.result == 'success'
293+
if: always() && needs.structure_check.result == 'success' && github.event_name != 'workflow_call'
294294
steps:
295295
- name: Download artifacts
296296
uses: actions/download-artifact@v4

.github/workflows/kernelctf-verify-all.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,27 @@ jobs:
2323
with:
2424
prNumber: ${{ matrix.pr }}
2525
skipRepro: ${{ inputs.skipRepro }}
26+
27+
backup_artifacts:
28+
runs-on: ubuntu-latest
29+
needs: [verify]
30+
if: always()
31+
steps:
32+
- name: Download artifacts
33+
uses: actions/download-artifact@v4
34+
with:
35+
path: ./artifacts
36+
37+
- name: Authenticate to Google Cloud
38+
uses: google-github-actions/auth@v2
39+
with:
40+
credentials_json: '${{secrets.KERNELCTF_GCS_SA_KEY}}'
41+
42+
- name: Upload artifacts to GCS
43+
uses: 'google-github-actions/upload-cloud-storage@v2'
44+
with:
45+
path: ./artifacts
46+
destination: kernelctf-build/artifacts/verify_all_${{ github.run_id }}_pr${{ join(fromJSON(format('[{0}]', inputs.prs)), "_") }}
47+
parent: false
48+
predefinedAcl: publicRead
49+
process_gcloudignore: false # removes warnings that .gcloudignore file does not exist

0 commit comments

Comments
 (0)