0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/.github/workflows/clean-up-images.yml
Gao Sun 42e5dab7c6
ci: update release workflow (#3742)
use the target deployment environment `dev` and `prod` to tag current
deployed images instead of `sha-*` since it is unstable and unclear. remove
`sha-*` tagged and untagged images regularly.
2023-04-23 17:47:28 +08:00

21 lines
526 B
YAML

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@v2
with:
image-names: logto
cut-off: Three days ago UTC
account-type: org
org-name: logto-io
keep-at-least: 1
filter-tags: "sha-*"
token: ${{ secrets.BOT_PAT }}