Skip to content

Commit ede144f

Browse files
committed
add cleanup job
1 parent 94fe59e commit ede144f

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/cleanup.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Cleaning
2+
3+
on:
4+
#schedule:
5+
# - cron: 1 8 * * 1
6+
# watch:
7+
# types: started
8+
workflow_dispatch:
9+
10+
jobs:
11+
#Cleanup-Old-Releases:
12+
# runs-on: ubuntu-20.04
13+
# if: github.event.repository.owner.id == github.event.sender.id
14+
# steps:
15+
# - name: Delete Older Releases
16+
# uses: dev-drprasad/delete-older-releases@master
17+
# with:
18+
# keep_latest: 4
19+
# delete_tags: true
20+
# env:
21+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
23+
Cleanup-Old-Artifacts:
24+
runs-on: ubuntu-20.04
25+
if: github.event.repository.owner.id == github.event.sender.id
26+
steps:
27+
- name: Cleanup Old Action Artifacts
28+
uses: kolpav/purge-artifacts-action@master
29+
with:
30+
token: ${{ github.token }}
31+
expire-in: 3d
32+
33+
Cleanup-Workflow-Logs:
34+
runs-on: ubuntu-20.04
35+
if: github.event.repository.owner.id == github.event.sender.id
36+
steps:
37+
- name: Cleanup Workflow Logs
38+
uses: Mattraks/delete-workflow-runs@main
39+
with:
40+
token: ${{ github.token }}
41+
repository: ${{ github.repository }}
42+
retain_days: 3

0 commit comments

Comments
 (0)