Skip to content

Commit

Permalink
feat: added new workflow to prune old images (#88)
Browse files Browse the repository at this point in the history
* feat: added workflow to prune old images (#1)

* fix: added runs-on variable (#2)

* feat: trying new regex (#3)

* fix: trying commit as expression (#4)

* fix: trying keep tags (#5)

* beingtoospecific (#6)

* fix: regex expression fixed (#7)

* fix: new regex (#8)

* Test (#9)

* fix: new regex

* test

* fix: fixed regex hopefully (#10)

* fix: pruning snapshots (#11)

* feat: added new workflow to prune old images for packages sparrow and charts/sparrow

* fix: removed keep-last conditions

* fix: removed comments

* fix: removed unnecessary permission declaration

* fix: removed dry-run
  • Loading branch information
JTaeuber authored Jan 29, 2024
1 parent 585c9c1 commit 3f5416b
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/prune.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Prune GHCR

on:
schedule:
- cron: '0 0 * * *'

permissions:
contents: write
packages: write
security-events: write

jobs:
prune_images:
name: Prune old sparrow images
runs-on: ubuntu-latest

steps:

- name: Prune Images
uses: vlaurin/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
organization: caas-team
container: sparrow
keep-younger-than: 7 # days
prune-untagged: true
prune-tags-regexes: |
^commit-
SNAPSHOT-.*$
- name: Prune Charts
uses: vlaurin/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
organization: caas-team
container: charts/sparrow
keep-younger-than: 7 # days
prune-untagged: true
prune-tags-regexes: |
commit-.*$

0 comments on commit 3f5416b

Please sign in to comment.