Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/sycl_cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Cleanup

on:
workflow_run:
workflows:
- SYCL
- SYCL Nightly Builds
- SYCL Post Commit
types: [completed]

jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name.startsWith("sycl_linux_");
});
matchArtifacts.forEach(async (artifact) => {
await github.rest.actions.deleteArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: artifact.id
});
});