Skip to content

Delete old ghrc images #555

Delete old ghrc images

Delete old ghrc images #555

Workflow file for this run

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()