Delete old ghrc images #554
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: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' # every day at midnight | |
jobs: | |
clean-ghcr: | |
name: Delete old unused container images | |
runs-on: ubuntu-latest | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
steps: | |
- name: Delete containers older than a week π | |
id: delete-containers | |
uses: snok/container-retention-policy@v1 | |
with: | |
image-names: energyvision/web-global,energyvision/web-global-test,energyvision/web-germany,energyvision/web-brazil,energyvision/web-argentina,energyvision/web-poland,energyvision/web-equinorfunds,energyvision/web-japan,energyvision/web-production,energyvision/web,energyvision/web-global-development,energyvision/web-southkorea,energyvision/web-storage,energyvision/studio-germany,energyvision/studio-brazil,energyvision/studio-argentina,energyvision/studio-poland,energyvision/studio-equinorfunds,energyvision/studio-japan,energyvision/studio-storage,energyvision/studio-global-development,energyvision/studio-southkorea,energyvision/studio-global-test | |
#image-names: energyvision/web-global-development,energyvision/studio-global-development | |
cut-off: A week ago UTC | |
account-type: org | |
org-name: Equinor | |
keep-at-least: 5 | |
untagged-only: false | |
token: ${{ secrets.NLUN_GITHUB_PAT }} | |
- name: log-errors-to-slack π | |
uses: act10ns/slack@v2 | |
with: | |
status: ${{ job.status }} | |
steps: ${{ toJson(steps) }} | |
if: failure() |