Clean up old CI Docker Images #58
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
# | |
# Copyright: 2023, The Geany contributors | |
# License: GNU GPL v2 or later | |
name: Clean up old CI Docker Images | |
on: | |
workflow_dispatch: | |
schedule: | |
# Run weekly on Friday | |
- cron: '34 7 * * FRI' | |
jobs: | |
cleanup: | |
name: Remove all but the latest $PACKAGES_TO_KEEP untagged versions of the Geany CI Docker image | |
runs-on: ubuntu-22.04 | |
permissions: | |
packages: write | |
env: | |
PACKAGES_TO_KEEP: 5 | |
DOCKER_IMAGE_NAME: "geany-mingw64-ci" | |
steps: | |
- uses: actions/delete-package-versions@v5 | |
with: | |
package-name: ${{ env.DOCKER_IMAGE_NAME }} | |
package-type: 'container' | |
min-versions-to-keep: ${{ env.PACKAGES_TO_KEEP }} | |
delete-only-untagged-versions: 'true' |