Thanks to visit codestin.com
Credit goes to github.com

Skip to content

GHCR Cleanup

GHCR Cleanup #47

Workflow file for this run

name: GHCR Cleanup
on:
schedule:
- cron: "0 10 * * *" # ~2am PST
workflow_dispatch:
inputs:
keep-younger-than:
description: "Keep images younger than (days)"
required: true
default: "30"
permissions:
contents: read
packages: write
jobs:
ghcr-cleanup:
runs-on: lab
strategy:
matrix:
package:
- gateway/gateway
- gateway/gateway-agent
- gateway/charts/gateway-api
- gateway/charts/gateway
steps:
- name: ghcr-prune
uses: vlaurin/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
organization: githedgehog
container: ${{ matrix.package }}
keep-younger-than: ${{ inputs.keep-younger-than || '30' }} # days
prune-tags-regexes: |
^v0-
^master-
^pr-
-master
-pr
-dirty