Skip to content

Clean old Docker images #20

Clean old Docker images

Clean old Docker images #20

Workflow file for this run

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 }}