Skip to content

Commit

Permalink
Add github actions for purge cli images
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov committed Oct 11, 2024
1 parent 638d432 commit 593f392
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/purge-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Purge GitHub container registry.

on:
workflow_dispatch:
# Runs weekly
schedule:
- cron: '0 0 * * 1'

jobs:
purge-images:
if: github.repository == 'veraPDF/veraPDF-apps'
name: Delete old images from ghcr.io
runs-on: ubuntu-latest
steps:
- name: Delete all PR containers older than a week
uses: snok/container-retention-policy@v2
with:
image-names: cli
cut-off: 1 week ago UTC
account-type: org
org-name: veraPDF
keep-at-least: 1
skip-tags: latest
untagged-only: false
token: ${{ secrets.PAT }}

0 comments on commit 593f392

Please sign in to comment.