We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d690347 commit 51692ebCopy full SHA for 51692eb
dc/registry_delete.sh
@@ -41,7 +41,12 @@ function validate_image_tag() {
41
# Delete images older than DELETE_SINCE_DAYS and exit 0
42
if [ -n "$DELETE_SINCE_DAYS" ]; then
43
echo "::notice::Deleting images older than $DELETE_SINCE_DAYS days"
44
- repo_tags=$(curl -s -u $HTTPS_USERNAME https://$REGISTRY_URL/v2/$GITHUB_OWNER/$APP_NAME/tags/list | jq -r '.tags[]')
+ repo_tags=$(curl -s -u $HTTPS_USERNAME https://$REGISTRY_URL/v2/$GITHUB_OWNER/$APP_NAME/tags/list | jq -r '.tags[]?')
45
+ if [ -z "$repo_tags" ]; then
46
+ echo "::warning::No images found for $APP_NAME"
47
+ exit 0
48
+ fi
49
+
50
while IFS= read -r tag; do
51
manifest=$(curl -s -u $HTTPS_USERNAME \
52
-H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
0 commit comments