1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 21:29:42 +00:00

feat: automate contributor list generation and display in README, and make support section collapsible

This commit is contained in:
Tw93
2026-01-05 11:16:46 +08:00
parent c871d1ada0
commit 114cdc72b0
2 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
name: Update Contributors
on:
push:
branches: [main, dev]
workflow_dispatch:
schedule:
- cron: "0 0 * * 0" # Every Sunday at midnight UTC
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update-contributors:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Generate contributors SVG
uses: wow-actions/contributors-list@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
svgPath: CONTRIBUTORS.svg
svgWidth: 1210
avatarMargin: 12
userNameHeight: 20
noCommit: true
includeBots: false
excludeUsers: "github-actions web-flow dependabot claude"
itemTemplate: |
<g transform="translate({{ x }}, {{ y }})">
<a xlink:href="{{{ url }}}" class="contributor-link" target="_blank" rel="nofollow sponsored" title="{{{ name }}}" id="{{{ name }}}">
<image width="{{ width }}" height="{{ height }}" xlink:href="{{{ avatar }}}" />
<text x="32" y="74" text-anchor="middle" alignment-baseline="middle" font-size="10">{{{ name }}}</text>
</a>
</g>
- name: Commit & Push
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update contributors [skip ci]"
file_pattern: CONTRIBUTORS.svg