File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : " Purge old ghcr.io test images periodically"
3
+
4
+ " on " :
5
+ workflow_dispatch :
6
+ inputs :
7
+ dry_run :
8
+ type : boolean
9
+ default : true
10
+ description : " Do a dry run?"
11
+ schedule :
12
+ - cron : " 0 5 * * *" # at 05:00 every day
13
+
14
+ permissions :
15
+ packages : write
16
+
17
+ jobs :
18
+ clean :
19
+ runs-on : ubuntu-latest
20
+ name : Delete old test images
21
+ steps :
22
+ # https://github.com/snok/container-retention-policy?tab=readme-ov-file#parameters
23
+ - uses : snok/container-retention-policy@4f22ef80902ad409ed55a99dc5133cc1250a0d03 # v3.0.0
24
+ with :
25
+ # account must be the gh org name when running for an org, and 'user' when running for a user
26
+ account : ${{ (github.repository_owner == github.actor) && 'user' || github.repository_owner }}
27
+ token : ${{ secrets.GITHUB_TOKEN }}
28
+ image-names : |
29
+ ${{ github.event.repository.name }}/workbench-images
30
+ ${{ github.event.repository.name }}/workbench-images/build-cache
31
+ image-tags : " *"
32
+ cut-off : " 3w"
33
+ dry-run : ${{ inputs.dry_run || false }}
34
+ env :
35
+ RUST_BACKTRACE : 1
You can’t perform that action at this time.
0 commit comments