Skip to content

feat(contribs): automatic contributor table creation #10

feat(contribs): automatic contributor table creation

feat(contribs): automatic contributor table creation #10

name: Update contributors
on:
push:
branches:
- master
pull_request:
permissions:
contents: write
jobs:
update_contributors:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm install axios
- name: Update CONTRIBUTORS.md
run: |
node .github/scripts/update-contributors.js
- name: Commit and push if it's not up to date
run: |
git diff
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git commit -am "Update CONTRIBUTORS.md" || exit 0
git push