summaryrefslogtreecommitdiff
path: root/.github/workflows/cleanup.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/cleanup.yml')
-rw-r--r--.github/workflows/cleanup.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml
new file mode 100644
index 000000000..d429e0ce3
--- /dev/null
+++ b/.github/workflows/cleanup.yml
@@ -0,0 +1,34 @@
+---
+name: Cleanup
+
+# yamllint disable-line rule:truthy
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: "4 4 * * 0"
+
+concurrency:
+ group: ${{ github.workflow }}
+ cancel-in-progress: false
+
+permissions:
+ contents: read
+
+jobs:
+ container-cache:
+ name: Container cache
+ runs-on: ubuntu-24.04
+ permissions:
+ # Organization GHCR
+ packages: write
+
+ steps:
+ - name: Prune
+ uses: snok/container-retention-policy@v3.0.0
+ with:
+ account: "${{ github.repository_owner }}"
+ token: "${{ secrets.GITHUB_TOKEN }}"
+ image-names: "cache"
+ image-tags: "!searxng-*"
+ cut-off: "1w"
+ keep-n-most-recent: "100"