Skip to content

Prune ghcr.io

Prune ghcr.io #94

Workflow file for this run

# Prunes old aissemble-* untagged containers
name: Prune ghcr.io
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
imageName:
description: "Image names you want to remove"
required: true
type: string
default: 'aissemble-* com.boozallen-*'
schedule:
- cron: "0 0 * * *" # every day at midnight
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Prune
uses: snok/container-retention-policy@v2
with:
image-names: ${{ inputs.imageName }}
cut-off: Two days ago UTC
account-type: org
org-name: boozallen
keep-at-least: 2
untagged-only: false
dry-run: true
token: ${{ secrets.GHCR_IO_TOKEN }}