Maintenance #259
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
# A workflow that is scheduled daily and carries out maintenance tasks. | |
name: Maintenance | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: {} | |
concurrency: | |
group: package-repository | |
cancel-in-progress: false | |
jobs: | |
# A job to delete obsolete package versions (container images) from the GitHub registry. | |
delete_container_images: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: Delete obsolete package versions. | |
uses: jenskeiner/[email protected] | |
with: | |
# Don't delete main, master, develop, semantic version tags, and pull request tags. | |
exclude-tags: '^(?:main|master|develop|buildcache|\d+(?:\.\d+){0,2}|pr-\d+)$' | |
# Do not keep any other tags. | |
keep-n-tagged: 0 | |
# Do not keep any other images. | |
keep-n-untagged: 0 | |
token: ${{ secrets.GITHUB_TOKEN }} |