Skip to content

Commit d6f83ce

Browse files
Create update-citation-badge.yml
1 parent 96ae9ce commit d6f83ce

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Update Citation Badge
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # 每天 00:00 UTC 运行
6+
workflow_dispatch:
7+
8+
jobs:
9+
update-citations:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.x'
20+
21+
- name: Install Dependencies
22+
run: pip install requests
23+
24+
- name: Run Citation Script
25+
run: python .github/scripts/update_citations.py
26+
27+
- name: Commit and Push
28+
run: |
29+
git config user.name "github-actions[bot]"
30+
git config user.email "github-actions[bot]@users.noreply.github.com"
31+
git add citation-badge.svg
32+
git commit -m "Update citation badge"
33+
git push

0 commit comments

Comments
 (0)