From ab3efdf96f6bbbd0eb04dbe2c5f077507355d0b1 Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Tue, 3 Dec 2024 16:23:18 -0500 Subject: [PATCH] going to try to port this to woodpecker --- clean_gitea.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clean_gitea.sh b/clean_gitea.sh index 79d430d..0df2539 100755 --- a/clean_gitea.sh +++ b/clean_gitea.sh @@ -9,15 +9,16 @@ source .env # Let this also get pulled from a secret value if needed GITEA_DOCKER_CLEANER_TOKEN=${GITEA_DOCKER_CLEANER_TOKEN:-$SECRET_DOCKER_CLEANER_TOKEN} +GITEA_DOCKER_CLEANER=55c5b279ddbd66f48da79e0926b038221d283dce for page in $(seq 30 -1 1); do - PACK_LIST=$(curl --silent -X 'GET' 'https://gitea.simcop2387.info/api/v1/packages/simcop2387?limit=100&page='$page'&type=container&q=perl-container&token='$GITEA_DOCKER_CLEANER_TOKEN -H 'accept: application/json') + PACK_LIST=$(curl --silent -X 'GET' 'https://gitea.simcop2387.info/api/v1/packages/simcop2387?limit=100&page='$page'&type=container&q=perl-containers&token='$GITEA_DOCKER_CLEANER_TOKEN -H 'accept: application/json') if [[ $PACK_LIST != "[]" ]]; then for version in $(echo $PACK_LIST | jq -r '.[].version'); do echo $version - curl -X 'DELETE' 'https://gitea.simcop2387.info/api/v1/packages/simcop2387/container/perl-container/'$version'?token='$GITEA_DOCKER_CLEANER_TOKEN -H 'accept: application/json' + curl -X 'DELETE' 'https://gitea.simcop2387.info/api/v1/packages/simcop2387/container/perl-containers/'$version'?token='$GITEA_DOCKER_CLEANER_TOKEN -H 'accept: application/json' done fi