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 520c57b commit 07003b7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 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 * * *'
- cron: '0 11 * * *' # Schedule to run at 11:00 UTC every day
push:
branches-ignore:
- master
Expand Down Expand Up @@ -41,9 +41,7 @@ jobs:
if [[ ${AGE} -ge ${THRESHOLD} ]]; then
echo "Deleting image tag ${TAG_NAME} (last updated: ${LAST_UPDATED})"
Delete the image using Docker Hub API
# curl -X DELETE \
# -u "${{ secrets.DOCKER_HUB_USERNAME }}:${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}" \
# "https://hub.docker.com/v2/repositories/${REPO}/tags/${TAG_NAME}/"
# Uncomment the following lines to enable image deletion
fi
done

0 comments on commit 07003b7

Please sign in to comment.