mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-04-17 19:49:23 +02:00
Add workflow to prune old GHCR images
This workflow allows for manual execution to prune old images from the GitHub Container Registry, keeping the latest and a specified number of tagged images.
This commit is contained in:
21
.github/workflows/prune.yml
vendored
Normal file
21
.github/workflows/prune.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Prune Old GHCR Images
|
||||
|
||||
on:
|
||||
#schedule:
|
||||
# - cron: '0 0 * * 0' # Runs at 00:00 every Sunday
|
||||
workflow_dispatch: # Allows you to run it manually from the Actions tab
|
||||
|
||||
jobs:
|
||||
prune:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
steps:
|
||||
- name: Cleanup old images
|
||||
uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16
|
||||
with:
|
||||
package: autoglue # Tell the action exactly which lowercase package to look for
|
||||
exclude-tags: latest,main,v*
|
||||
keep-n-tagged: 5
|
||||
delete-untagged: true
|
||||
delete-partial-images: true
|
||||
Reference in New Issue
Block a user