Skip to content

Commit

Permalink
Automatic (outdated) images cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderM91 committed Oct 17, 2024
1 parent e667a5e commit e9060dd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/cleanup-old-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Cleanup Old Docker Images > 6 months by the scheduler

on:
schedule:
- cron: '0 11 * * *' # Schedule to run at 11:00 UTC every day
- cron: '0 11 * * *'
push:
branches-ignore:
- master
Expand Down Expand Up @@ -44,7 +44,9 @@ jobs:
if [[ ${AGE} -ge ${THRESHOLD} ]] && [[ ${TAG_NAME} =~ ${HASH_PATTERN} ]]; then
echo "Deleting image tag ${TAG_NAME} (last updated: ${LAST_UPDATED})"
# Uncomment the following lines to enable image deletion
fi
if [[ ${IMAGES_DELETED} == false ]]; then
echo "No images matching the pattern were found for deletion."
fi
done

0 comments on commit e9060dd

Please sign in to comment.