-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 1.08 KB
/
cleanup-repository.yaml
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
name: Remove old artifacts
on:
schedule:
- cron: '0 12 * * *' # every day at 12:00 UTC
workflow_dispatch:
jobs:
remove_old_artifacts:
name: Remove old artifacts
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
timeout-minutes: 10 # stop the task if it takes longer
steps:
- name: Delete old package versions of ${{ github.event.repository.name }}
uses: actions/delete-package-versions@v5.0.0
with:
package-name: ${{ github.event.repository.name }}
package-type: container
token: ${{ secrets.GITHUB_TOKEN }}
min-versions-to-keep: 100
ignore-versions: v([0-9]+\.?)+$
- name: Delete old package versions of helm/${{ github.event.repository.name }}
uses: actions/delete-package-versions@v5.0.0
with:
package-name: helm/${{ github.event.repository.name }}
package-type: container
token: ${{ secrets.GITHUB_TOKEN }}
min-versions-to-keep: 100
ignore-versions: v([0-9]+\.?)+$