Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Prune containers

Prune containers #1

Workflow file for this run

name: Prune Containers
on:
schedule:
- cron: '33 6 * * *' # 6:33 UTC every day
workflow_dispatch:
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Prune
uses: vlaurin/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
organization: ${{ github.actor }}
container: ${{ env.IMAGE_NAME }}
dry-run: true # Dry-run first, then change to `false`
keep-younger-than: 2 # days
keep-last: 2
prune-untagged: true