-
-
Notifications
You must be signed in to change notification settings - Fork 89
32 lines (28 loc) · 1.08 KB
/
update-contributors.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Update contributors
on:
push:
paths-ignore:
- "CONTRIBUTORS.md"
workflow_dispatch:
schedule:
- cron: "0 */12 * * *" # Every 12 hours
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
token: ${{ secrets.ROBOT_TOKEN }}
- name: Compile contributors
run: | # todo: remove --experimental-fetch at node 17
ROBOT_TOKEN=${{ secrets.ROBOT_TOKEN }} node --experimental-fetch .github/update-contributors.js
- name: Push to Git
continue-on-error: true # This will probably error when the file hasn't changed
run: |
git config --global user.email "72629236+dothq-robot@users.noreply.github.com"
git config --global user.name "dothq-robot"
git add CONTRIBUTORS.md
git commit -m "👥 Update CONTRIBUTORS.md"
git push origin main