update-contributors-svg #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: update-contributors-svg | |
on: | |
workflow_dispatch: # 用于手动触发 | |
schedule: | |
- cron: "0 7 * * *" # 每天 7:00 定时执行 | |
jobs: | |
update-svg: | |
name: Update contributors SVG | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Set node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
- name: Install deps | |
run: pnpm install | |
- name: Run SVG generation script | |
run: | | |
pnpm exec gh-contrib-svg -t ${{ secrets.GITHUB_TOKEN }} -o zotero-chinese -r wiki | |
pnpm exec gh-contrib-svg -t ${{ secrets.GITHUB_TOKEN }} -o zotero-chinese -r zotero-plugins | |
pnpm exec gh-contrib-svg -t ${{ secrets.GITHUB_TOKEN }} -o l0o0 -r translators_CN | |
pnpm exec gh-contrib-svg -t ${{ secrets.GITHUB_TOKEN }} -o redleafnew -r Chinese-STD-GB-T-7714-related-csl | |
- name: Commit | |
uses: EndBug/add-and-commit@v9 | |
with: | |
message: "chore(workflow): update contributors image" | |
add: ".github-contributors/*" | |
author_name: github-actions[bot] | |
author_email: github-actions[bot]@users.noreply.github.com | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |