paste69/.github/workflows/docker-prune.yml

27 lines
662 B
YAML
Raw Permalink Normal View History

2024-01-07 19:20:48 +00:00
name: Prune containers
2024-01-07 19:15:56 +00:00
on:
2024-01-07 19:22:56 +00:00
workflow_dispatch:
2024-01-07 19:20:48 +00:00
inputs:
older-than:
type: number
default: 14
description: "Prune containers older than X days"
keep-last:
type: number
default: 3
description: "Keep last X containers"
2024-01-07 19:15:56 +00:00
jobs:
2024-01-07 19:20:48 +00:00
prune:
2024-01-07 19:15:56 +00:00
runs-on: ubuntu-latest
2024-01-07 19:44:31 +00:00
permissions: write-all
2024-01-07 19:15:56 +00:00
steps:
2024-01-07 19:20:48 +00:00
- name: Prune GHCR containers
2024-01-07 19:15:56 +00:00
uses: vlaurin/action-ghcr-prune@v0.5.0
with:
2024-01-07 19:22:56 +00:00
token: ${{ secrets.GITHUB_TOKEN }}
2024-01-07 19:46:27 +00:00
container: paste69
2024-01-07 19:20:48 +00:00
keep-younger-than: ${{ inputs.older-than }}
keep-last: ${{ inputs.keep-last }}
2024-01-07 19:15:56 +00:00
prune-untagged: true