Skip to content

Commit

Permalink
Merge pull request #340 from GDATASoftwareAG/container-registry-reten…
Browse files Browse the repository at this point in the history
…tion

adds a retention job that runs hourly
  • Loading branch information
GdataGithubBot authored Jan 17, 2024
2 parents 9bee242 + a677f33 commit 5ab1025
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/image-retention.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Delete old container images

on:
schedule:
- cron: "15 * * * *" # run hourly

jobs:
clean-ghcr:
name: Delete old unused container images
runs-on: ubuntu-latest
steps:
- name: Delete 'dev' containers older than 2 Month
uses: snok/container-retention-policy@v2
with:
image-names: scanserver,scanclient,vaas/*
cut-off: 2 month ago UTC
timestamp-to-use: created_at
account-type: org
org-name: GDATASoftwareAG
keep-at-least: 5
dry-run: false
token: ${{ secrets.PAT_CONTAINER_REGISTRY }}

0 comments on commit 5ab1025

Please sign in to comment.