mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-27 00:22:22 +00:00
b28ce934b0
- use proper json array filtering - use long parameter names - add comments - add cleaner for coverage runs - keep last run for branches with badges at README Signed-off-by: David Sterba <dsterba@suse.com>
17 lines
494 B
Bash
Executable File
17 lines
494 B
Bash
Executable File
#!/bin/sh -xe
|
|
#
|
|
# Keep last runs of master and release-test
|
|
|
|
workflow='Static binaries'
|
|
repo="kdave/btrfs-progs"
|
|
|
|
type -p gh > /dev/null || { echo "ERROR: gh tool not found"; exit 1; }
|
|
type -p jq > /dev/null || { echo "ERROR: jq tool not found"; exit 1; }
|
|
|
|
for branch in master release-test; do
|
|
for id in $(gh run -R "$repo" list --workflow "$workflow" --branch "$branch" --json databaseId | jq '.[1:] | .[].databaseId'); do
|
|
echo "Delete run $id"
|
|
gh run -R "$repo" delete "$id"
|
|
done
|
|
done
|