Skip to content

Delete old container images #310

Delete old container images

Delete old container images #310

Workflow file for this run

name: Delete old container images
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
clean-ghcr:
name: Delete old unused container images
runs-on: ubuntu-latest
steps:
- name: Delete 'dev' containers older than a week
uses: snok/container-retention-policy@v2
with:
image-names: docker/*-dev
cut-off: A week ago UTC
account-type: org
org-name: baresip
keep-at-least: 1
untagged-only: true
token: ${{ secrets.PAT }}
- name: Delete 'stable' containers older two months
uses: snok/container-retention-policy@v2
with:
image-names: docker/*
cut-off: six months ago UTC
account-type: org
org-name: baresip
keep-at-least: 1
skip-tags: latest
token: ${{ secrets.PAT }}