Cleanup Old Images #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |