Prune untagged images #151
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: Prune untagged images | |
on: | |
schedule: | |
- cron: '12 4 1-7 * SAT' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
prune: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
cache-dependency-path: | | |
.github/workflows/prune_images.yaml | |
- name: Install requests | |
run: pip install requests | |
- name: Prune untagged images | |
env: | |
GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
python ghcr-prune.py --container hello-ghcr-meow --prune-age 15 |