Delete old container images #217
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Delete old container images | |
on: | |
schedule: | |
- cron: '0 0 * * *' # every day at midnight | |
jobs: | |
clean-ghcr: | |
name: Delete old unused container images | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
deployments: write | |
packages: write | |
repository-projects: write | |
steps: | |
- name: Delete containers older than a week | |
uses: snok/container-retention-policy@v2 | |
with: | |
image-names: server, channel-ingress, channel-report-check, channel-report | |
cut-off: A week ago UTC | |
timestamp-to-use: updated_at | |
account-type: org | |
org-name: adsviewer | |
keep-at-least: 1 | |
untagged-only: true | |
token: ${{ secrets.GHCR_TOKEN }} |