-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 1013 Bytes
/
cleanup.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
34
35
36
name: Cleanup old images
on:
schedule:
# Every 5 minutes
- cron: '*/15 * * * *'
workflow_dispatch:
permissions:
packages: write
jobs:
cleanup:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image: [lumina]
steps:
- name: Delete untagged images
uses: actions/delete-package-versions@0d39a63126868f5eefaa47169615edd3c0f61e20 # v4
with:
package-name: eternal-linux/${{ matrix.image }}
package-type: container
min-versions-to-keep: 10
delete-only-untagged-versions: 'true'
token: ${{ secrets.GITHUB_TOKEN }}
# - name: Delete PR images
# uses: actions/delete-package-versions@0d39a63126868f5eefaa47169615edd3c0f61e20 # v4
# with:
# package-name: eternal-linux/${{ matrix.image }}
# package-type: container
# min-versions-to-keep: 50
# ignore-versions: '^(?!pr[0-9]{2}-).+$'
# token: ${{ secrets.GITHUB_TOKEN }}