Backend - Delete old container images #124
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: Backend - Delete old container images | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 6 * * *" # every day at 6 in the morning | |
jobs: | |
clean-ghcr: | |
name: Delete old unused container images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Delete dev containers older than a week | |
uses: snok/[email protected] | |
with: | |
image-names: epinio-ui | |
cut-off: A week ago UTC | |
account-type: org | |
org-name: epinio | |
keep-at-least: 1 | |
filter-tags: v*-[0-9]*-g* | |
filter-include-untagged: true | |
token: ${{ secrets.IMG_CLEANUP_TOKEN }} | |
- name: Delete untagged containers older than a week | |
uses: snok/[email protected] | |
with: | |
image-names: epinio-ui | |
cut-off: A week ago UTC | |
account-type: org | |
org-name: epinio | |
keep-at-least: 1 | |
token: ${{ secrets.IMG_CLEANUP_TOKEN }} | |
untagged-only: true |