Skip to content

Cleanup Old Images

Cleanup Old Images #4

Workflow file for this run

name: Cleanup Old Images
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
# push:
# branches: [ master ]
schedule:
# cleanup old images regulary
- cron: '13 23 * * 5'
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
cleanup-old-images:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
steps:
- uses: actions/delete-package-versions@v4
with:
package-name: "divinum-officium"
package-type: 'container'
min-versions-to-keep: 5