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+ name : Fetch and Cache Repo Data
2+
3+ on :
4+ workflow_dispatch :
5+ schedule :
6+ - cron : ' 0 2 * * *' # 每天凌晨2点自动运行
7+
8+ jobs :
9+ fetch-data :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout code
13+ uses : actions/checkout@v4
14+
15+ - name : Setup Node.js
16+ uses : actions/setup-node@v4
17+ with :
18+ node-version : ' 20'
19+
20+ - name : Install dependencies
21+ run : |
22+ pnpm install || npm install
23+
24+ - name : Run fetch.js to generate data
25+ run : node cache/fetch.js
26+
27+ - name : Create or update release with data file
28+ uses : softprops/action-gh-release@v1
29+ with :
30+ tag_name : data-cache
31+ name : Cached Repo Data
32+ body : ' Auto-generated repo and NPM data file.'
33+ files : fetched-data.json
34+ env :
35+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments