update-contributors-svg #309
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-repo-contributors: | |
name: Update contributors SVG for repos | |
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 styles | |
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: update contributors for repos [skip ci]" | |
add: ".github-contributors/*" | |
author_name: github-actions[bot] | |
author_email: github-actions[bot]@users.noreply.github.com | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
update-org-contributors: | |
name: Update contributors for org | |
needs: | |
- update-repo-contributors | |
runs-on: ubuntu-latest | |
steps: | |
- name: Update contributors for org | |
uses: thinkasany/organize-contributors@master | |
with: | |
organize_name: zotero-chinese | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
png_path: .github-contributors/contributors.png | |
json_path: .github-contributors/contributors.json | |
branch: main | |
excludes_list: "ImgBotApp,github-actions[bot],actions-user,imgbot[bot],dependabot[bot],renovate[bot]" | |
committer_name: github-actions[bot] | |
committer_email: github-actions[bot]@users.noreply.github.com | |
commit_message: "chore: update contributors for org [skip ci]" |