Docker Cleanup #14
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
# snippet close to examples from https://github.com/snok/container-retention-policy | |
name: Docker Cleanup | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' # everyday at midnight | |
jobs: | |
delete: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Delete untagged images | |
uses: snok/[email protected] | |
with: | |
account: earthobservations | |
token: ${{ secrets.GITHUB_TOKEN }} | |
image-names: "wetterdienst" | |
tag-selection: untagged | |
cut-off: 0d | |
- name: Delete pr tagged images | |
uses: snok/[email protected] | |
with: | |
account: earthobservations | |
token: ${{ secrets.GITHUB_TOKEN }} | |
image-names: "wetterdienst" | |
image-tags: "pr-*" | |
cut-off: 0d |