Clean old Docker images #20
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: Clean old Docker images | |
on: | |
schedule: | |
- cron: '0 7 * * 1' # Every monday at 7am | |
workflow_dispatch: # Allow triggering this pipeline manually | |
jobs: | |
clean: | |
name: Docker images clean | |
runs-on: ubuntu-latest | |
steps: | |
- name: Delete old production images | |
uses: snok/container-retention-policy@v2 | |
with: | |
image-names: etabli/etabli-main # Since using `token-type: github-token` only 1 image name can be specified | |
cut-off: A week ago UTC | |
account-type: org | |
org-name: betagouv | |
keep-at-least: 5 | |
skip-tags: latest | |
token-type: github-token | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Delete old development images | |
# uses: snok/container-retention-policy@v2 | |
# with: | |
# image-names: etabli/etabli-dev # Since using `token-type: github-token` only 1 image name can be specified | |
# cut-off: A week ago UTC | |
# account-type: org | |
# org-name: betagouv | |
# keep-at-least: 5 | |
# skip-tags: latest | |
# token-type: github-token | |
# token: ${{ secrets.GITHUB_TOKEN }} |