Skip to content

Commit

Permalink
change latest 5 to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Mautjee committed Sep 11, 2024
1 parent 2ea6b5a commit 7d81e42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/cleanup-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ delete_old_tags() {
echo "Processing repository: $repo"

# List tags and filter for SHA-based tags, excluding the most recent 5
SHA_TAGS=$(doctl registry repository list-tags "$repo" --format Tag --no-header | grep -E '^sha' | sort -r | tail -n +6) || true
SHA_TAGS=$(doctl registry repository list-tags "$repo" --format Tag --no-header | grep -E '^sha' | sort -r | tail -n +1) || true

if [ -z "$SHA_TAGS" ]; then
echo "No old SHA tags found for repository: $repo"
Expand Down

0 comments on commit 7d81e42

Please sign in to comment.