Files
searxng/.github/workflows/cleanup.yml
dependabot[bot] 454f95a661 [upd] github-actions: Bump snok/container-retention-policy (#5248)
Bumps [snok/container-retention-policy](https://github.com/snok/container-retention-policy) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/snok/container-retention-policy/releases)
- [Commits](4f22ef8090...3b0972b227)

---
updated-dependencies:
- dependency-name: snok/container-retention-policy
  dependency-version: 3.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-26 10:03:19 +02:00

38 lines
1007 B
YAML

---
name: Cleanup
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
schedule:
- cron: "4 4 * * *"
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: read
jobs:
registry:
# FIXME: On forks it fails with "Failed to fetch packages: missing field `id` at line 1 column 141"
if: github.repository_owner == 'searxng' || github.event_name == 'workflow_dispatch'
name: Registry
runs-on: ubuntu-24.04
permissions:
# Organization GHCR
packages: write
steps:
- name: Prune
uses: snok/container-retention-policy@3b0972b2276b171b212f8c4efbca59ebba26eceb # v3.0.1
with:
account: "${{ github.repository_owner }}"
token: "${{ secrets.GITHUB_TOKEN }}"
# Remove only cache images https://github.com/snok/container-retention-policy/issues/97
image-names: "cache"
image-tags: "!searxng*"
cut-off: "1d"
keep-n-most-recent: "30"