Skip to content

Backend - Delete old container images #121

Backend - Delete old container images

Backend - Delete old container images #121

name: Backend - Delete old container images
on:
workflow_dispatch:
schedule:
- cron: "0 6 * * *" # every day at 6 in the morning
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@v1.5.1
with:
image-names: epinio-ui
cut-off: A week ago UTC
account-type: org
org-name: epinio
keep-at-least: 1
filter-tags: v*-[0-9]*-g*
filter-include-untagged: true
token: ${{ secrets.IMG_CLEANUP_TOKEN }}
- name: Delete untagged containers older than a week
uses: snok/container-retention-policy@v1.5.1
with:
image-names: epinio-ui
cut-off: A week ago UTC
account-type: org
org-name: epinio
keep-at-least: 1
token: ${{ secrets.IMG_CLEANUP_TOKEN }}
untagged-only: true