2021-10-11 13:08:34 +01:00
|
|
|
name: ghcr-retention
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * *' # every day at midnight
|
2021-10-20 10:18:23 +01:00
|
|
|
workflow_dispatch:
|
2021-10-11 13:08:34 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
clean-ghcr:
|
|
|
|
name: Delete old unused container images
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Delete 'dev' containers older than a week
|
|
|
|
uses: sondrelg/container-retention-policy@v1
|
|
|
|
with:
|
|
|
|
image-names: dev-server,dev-ldap,dev-proxy
|
2021-10-20 10:17:57 +01:00
|
|
|
cut-off: One week ago UTC
|
2021-10-11 13:08:34 +01:00
|
|
|
account-type: org
|
|
|
|
org-name: goauthentik
|
|
|
|
untagged-only: false
|
|
|
|
token: ${{ secrets.GHCR_CLEANUP_TOKEN }}
|
|
|
|
skip-tags: gh-next,gh-master
|