0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-17 22:04:19 -05:00

ci: clean up old untagged images (#1305)

This commit is contained in:
Gao Sun 2022-06-29 20:36:51 +08:00 committed by GitHub
parent 0568b914a8
commit f8384af26a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

21
.github/workflows/clean-up-images.yml vendored Normal file
View file

@ -0,0 +1,21 @@
name: Clean Up Images
on:
schedule:
- cron: '0 0 * * *' # every day at midnight
jobs:
clean-ghcr:
name: Clean up untagged images
runs-on: ubuntu-latest
steps:
- name: Delete untagged images older than three days
uses: snok/container-retention-policy@v1
with:
image-names: logto
cut-off: Three days ago UTC
account-type: org
org-name: logto-io
keep-at-least: 1
untagged-only: true
token: ${{ secrets.BOT_PAT }}