btrfs-progs/ci/actions/keep-last-devel-runs
David Sterba 7c3b897803 btrfs-progs: ci: update cleanup scripts
Add limit parameter so workflows are not skipped if they don't fit the
default limit 10. Add more workflows to clean up after recent updates.

Signed-off-by: David Sterba <dsterba@suse.com>
2024-09-17 14:33:22 +02:00

14 lines
399 B
Bash
Executable File

#!/bin/sh -xe
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; }
repo="kdave/btrfs-progs"
from=11
for id in $(gh run -R "$repo" list --limit 100 --workflow 'Devel build and tests' --json databaseId | jq '.[].databaseId' | tail -n +${from}); do
echo "Delete run $id"
gh run -R "$repo" delete "$id"
done