mirror of
https://github.com/willfarrell/docker-crontab.git
synced 2025-04-19 12:49:48 +02:00
feat: cleanup old images on the 15th of the month.
This commit is contained in:
parent
c7a835217c
commit
c3a1963b9c
28
.github/workflows/cleanup.yml
vendored
Normal file
28
.github/workflows/cleanup.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
name: cleanup
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 15 * *'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: ${{ github.actor }}/docker-crontab
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cleanup-docker-crontab:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Delete Docker images older than a month.
|
||||||
|
uses: snok/container-retention-policy@v2
|
||||||
|
with:
|
||||||
|
account-type: personal
|
||||||
|
cut-off: One month ago UTC
|
||||||
|
keep-at-least: 4
|
||||||
|
skip-tags: latest
|
||||||
|
image-names: ${{ env.IMAGE_NAME }}
|
||||||
|
token: ${{ secrets.GHCR_TOKEN }}
|
Loading…
x
Reference in New Issue
Block a user