File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -eu
4+
5+ BRANCH=" documentation-preview"
6+ ARTIFACTS=$(
7+ gh api \
8+ --paginate \
9+ -H " Accept: application/vnd.github+json" \
10+ -H " X-GitHub-Api-Version: 2022-11-28" \
11+ /repos/probabl-ai/skore/actions/artifacts \
12+ |
13+ jq -c " .artifacts[] | select(.workflow_run.head_branch == \" ${BRANCH} \" ) | {id: .id, name: .name}"
14+ )
15+
16+ for ARTIFACT in $ARTIFACTS ; do
17+ ID=$( echo " ${ARTIFACT} " | jq -r ' .id' )
18+ NAME=$( echo " ${ARTIFACT} " | jq -r ' .name' )
19+
20+ echo " Deleting artifact (BRANCH: \" ${BRANCH} \" , NAME: \" ${NAME} \" , ID: \" ${ID} \" )"
21+
22+ gh api \
23+ --method DELETE \
24+ --silent \
25+ -H " Accept: application/vnd.github+json" \
26+ -H " X-GitHub-Api-Version: 2022-11-28" \
27+ /repos/probabl-ai/skore/actions/artifacts/${ID}
28+ done
You can’t perform that action at this time.
0 commit comments