-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (31 loc) · 986 Bytes
/
registry.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
name: "♻ Cleanup GHCR"
on:
schedule:
- cron: "0 0 * * 0" # At 00:00 on Sunday.
workflow_dispatch:
inputs:
reason:
description: 'Reason for manual trigger'
required: true
default: 'Manual trigger'
jobs:
clean-ghcr:
name: cleanup images
runs-on: ubuntu-latest
steps:
- name: Delete old container images
uses: snok/container-retention-policy@v3.0.0
id: retention
with:
image-names: "debian debian.python debian.staging ubuntu-cross-s390x ubuntu-cross-ppc64le ubuntu-cross-armhf"
cut-off: 1w
keep-at-least: 1
timestamp-to-use: updated_at
skip-tags: latest
account: linux-nvme
token: ${{ secrets.GITHUB_TOKEN }}
- name: Print Output
run: |-
echo "Failed cleanup for = ${{ steps.retention.outputs.failed }}"
echo "Needs manual cleanup = ${{ steps.retention.outputs.needs-github-assistance }}"