File tree Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ Useful for cleanup of pull request scoped images.
99
1010## Usage
1111
12- Example of workflow, that delete image when PR was closed.
12+ ## Delete image when PR was closed.
1313
1414``` yaml
15- name : ' [RM] Preview '
15+ name : Cleanup PR Images
1616
1717on :
1818 pull_request :
@@ -24,12 +24,40 @@ jobs:
2424 runs-on : ubuntu-latest
2525 steps :
2626 - name : Delete image
27- uses : bots-house/ghcr-delete-image-action@v1.0 .0
27+ uses : bots-house/ghcr-delete-image-action@v1.1 .0
2828 with :
2929 # NOTE: at now only orgs is supported
3030 owner : bots-house
3131 name : some-web-service
3232 # NOTE: using Personal Access Token
3333 token : ${{ secrets.PAT }}
3434 tag : pr-${{github.event.pull_request.number}}
35+ ` ` `
36+
37+ ## Keep latest N untagged images
38+
39+ ` ` ` yaml
40+ name : Cleanup Untagged Images
41+
42+ on :
43+ # every sunday at 00:00
44+ schedule :
45+ - cron : " 0 0 * * SUN"
46+ # or manually
47+ workflow_dispatch :
48+
49+ jobs :
50+ delete-untagged-images :
51+ name : Delete Untagged Images
52+ runs-on : ubuntu-latest
53+ steps :
54+ -
uses :
bots-house/[email protected] 55+ with :
56+ # NOTE: at now only orgs is supported
57+ owner : bots-house
58+ name : some-web-service
59+ # NOTE: using Personal Access Token
60+ token : ${{ secrets.PAT }}
61+ # Keep latest N untagged images
62+ untagged-keep-latest : 3
3563` ` `
You can’t perform that action at this time.
0 commit comments