File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Cleanup
2
+
3
+ on :
4
+ workflow_run :
5
+ workflows :
6
+ - SYCL
7
+ - SYCL Nightly Builds
8
+ - SYCL Post Commit
9
+ types : [completed]
10
+
11
+ jobs :
12
+ cleanup :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/github-script@v6
16
+ with :
17
+ script : |
18
+ let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
19
+ owner: context.repo.owner,
20
+ repo: context.repo.repo,
21
+ run_id: context.payload.workflow_run.id,
22
+ });
23
+ let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
24
+ return artifact.name.startsWith("sycl_linux_");
25
+ });
26
+ matchArtifacts.forEach(async (artifact) => {
27
+ await github.rest.actions.deleteArtifact({
28
+ owner: context.repo.owner,
29
+ repo: context.repo.repo,
30
+ artifact_id: artifact.id
31
+ });
32
+ });
You can’t perform that action at this time.
0 commit comments