Update contributors #1296
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 | |
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 |