-
-
Notifications
You must be signed in to change notification settings - Fork 41
36 lines (30 loc) · 929 Bytes
/
actions-clear.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 Actions Runs
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0" # 每周日00:00执行
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
sparse-checkout: "utils/cleanup_actions.py"
- name: Install dependencies
run: |
pip install requests
- name: cleanup UserScripts
env:
GITHUB_TOKEN: ${{ secrets.DELETE_ACTIONS_RUNS }}
REPO_OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.event.repository.name }}
run: |
python utils/cleanup_actions.py
- name: cleanup UserScriptsHistory
env:
GITHUB_TOKEN: ${{ secrets.DELETE_ACTIONS_RUNS }}
REPO_OWNER: ${{ github.repository_owner }}
REPO_NAME: "UserScriptsHistory"
run: |
python utils/cleanup_actions.py