Skip to content

Commit 954eb31

Browse files
authored
Merge pull request #1630 from RooVetGit/contributors
Contributors
2 parents fbdf758 + e068bd6 commit 954eb31

File tree

4 files changed

+282
-1
lines changed

4 files changed

+282
-1
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Update Contributors
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch: # Allows manual triggering
8+
9+
jobs:
10+
update-contributors:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write # Needed for pushing changes
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '18'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Update contributors
28+
run: npm run update-contributors
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Check for changes
33+
id: check-changes
34+
run: |
35+
if [[ -n "$(git status --porcelain README.md)" ]]; then
36+
echo "changes=true" >> $GITHUB_OUTPUT
37+
else
38+
echo "No changes to README.md"
39+
fi
40+
41+
- name: Commit and push changes
42+
if: steps.check-changes.outputs.changes == 'true'
43+
run: |
44+
git config --global user.name 'github-actions[bot]'
45+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
46+
git add README.md
47+
git commit -m "docs: update contributors list [skip ci]"
48+
git push

0 commit comments

Comments
 (0)