Skip to content

Commit

Permalink
ci: add a cleanup for the images
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed Oct 2, 2024
1 parent 82089ed commit e171c7b
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Cleaner

on:
workflow_dispatch:
# schedule:
# - cron: "0 0 * * *"
pull_request:
branches:
- "dev"

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- uses: actions/delete-package-versions@v5
with:
package-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
package-type: docker
min-versions-to-keep: 10
ignore-versions: '(v\d+\.\d+\.\d+|latest)'

0 comments on commit e171c7b

Please sign in to comment.