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:
parent
0568b914a8
commit
f8384af26a
1 changed files with 21 additions and 0 deletions
21
.github/workflows/clean-up-images.yml
vendored
Normal file
21
.github/workflows/clean-up-images.yml
vendored
Normal 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 }}
|
Loading…
Add table
Reference in a new issue