mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-25 11:59:11 +00:00
GAR job might need stderr
This commit is contained in:
parent
25965e0ca8
commit
1b9eabaee5
1 changed files with 4 additions and 4 deletions
8
.github/workflows/gar-cleanup.yml
vendored
8
.github/workflows/gar-cleanup.yml
vendored
|
@ -28,17 +28,17 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
flags="--format=json --location=${{matrix.region}} --repository=roleypoly"
|
flags="--format=json --location=${{matrix.region}} --repository=roleypoly"
|
||||||
|
|
||||||
packagesToPrune=$(gcloud artifacts packages list $flags 2>/dev/null | jq -r '.[].name')
|
packagesToPrune=$(gcloud artifacts packages list $flags | jq -r '.[].name')
|
||||||
|
|
||||||
for package in $packagesToPrune; do
|
for package in $packagesToPrune; do
|
||||||
tagsToKeep=$(gcloud artifacts tags list --package=$package $flags 2>/dev/null | jq -r '.[].version')
|
tagsToKeep=$(gcloud artifacts tags list --package=$package $flags | jq -r '.[].version')
|
||||||
versionsToCheck=$(gcloud artifacts versions list --package=$package $flags 2>/dev/null | jq -r '.[].name')
|
versionsToCheck=$(gcloud artifacts versions list --package=$package $flags | jq -r '.[].name')
|
||||||
|
|
||||||
for version in $versionsToCheck; do
|
for version in $versionsToCheck; do
|
||||||
if [[ "$tagsToKeep" =~ .*"$version".* ]]; then
|
if [[ "$tagsToKeep" =~ .*"$version".* ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
gcloud artifacts versions delete $version --package=$package $flags 2>/dev/null
|
gcloud artifacts versions delete $version --package=$package $flags
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Reference in a new issue