Delete old container images #435
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: Delete old container images | |
on: | |
schedule: | |
- cron: "36 5 * * *" | |
workflow_dispatch: | |
jobs: | |
clean-ghcr: | |
name: Delete old unused container images | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
# This is used to complete the identity challenge | |
# with sigstore/fulcio when running outside of PRs. | |
id-token: write | |
steps: | |
- name: Delete old images | |
uses: snok/container-retention-policy@v2 | |
with: | |
image-names: mqtt_exporter | |
cut-off: One month ago UTC | |
keep-at-least: 1 | |
account-type: personal | |
token: ${{ secrets.PAT }} |