Skip to content

Commit 6784355

Browse files
committed
btrfs-progs: ci: add cleanup script for coverage tests
Signed-off-by: David Sterba <[email protected]>
1 parent 665c098 commit 6784355

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ci/actions/keep-last-coverage

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh -xe
2+
#
3+
# Keep last runs of master and coverage-test
4+
5+
workflow='Code coverage tests'
6+
repo="kdave/btrfs-progs"
7+
8+
type -p gh > /dev/null || { echo "ERROR: gh tool not found"; exit 1; }
9+
type -p jq > /dev/null || { echo "ERROR: jq tool not found"; exit 1; }
10+
11+
for branch in master coverage-test; do
12+
for id in $(gh run -R "$repo" list --workflow "$workflow" --branch "$branch" --json databaseId | jq '.[1:] | .[].databaseId'); do
13+
echo "Delete run $id"
14+
gh run -R "$repo" delete "$id"
15+
done
16+
done

0 commit comments

Comments
 (0)