Skip to content

Delete old container images #14

Delete old container images

Delete old container images #14

name: Delete old container images
on:
schedule:
- cron: '0 0 * * *' # every day at midnight
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Testing the container deletion mechanism'
jobs:
purge-image:
name: Purge ${{ matrix.container }} from ghcr.io
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
container: [
apphandler,
authhandler,
avsdispatcher,
housekeeping,
ltihandler,
notepadhandler,
noteshandler,
staticserver,
]
steps:
- name: Delete old versions
uses: r26d/ghcr-delete-image-action@v1.1.0
with:
owner: ${{ github.repository_owner }}
name: ${{ matrix.container }}
token: ${{ secrets.GH_DELETE_PACKAGE }}
tagged-keep-latest: 5
untagged-keep-latest: 5
tag-regex: ^v\d+\.\d+\.\d+-rc\d+$