btrfs-progs/ci/actions/keep-last-static-binaries
David Sterba ae1bf6d881 btrfs-progs: ci: add github actions admin scripts
Add helper scripts to build static binaries manually or clean old runs.
Requires the 'gh' command line tool and write access the git repository.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-05-26 18:02:27 +02:00

14 lines
372 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=3
for id in $(gh run -R "$repo" list -w 'Static binaries' --json databaseId | jq '.[].databaseId' | tail -n +${from}); do
echo "Delete run $id"
gh run -R "$repo" delete "$id"
done