Retrieve latest Contributors #493
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: Retrieve latest Contributors | |
on: | |
workflow_dispatch: | |
schedule: | |
# At 4am every night | |
- cron: '0 4 * * *' | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
name: Fetch latest Contributors | |
steps: | |
- name: Get Contributors | |
id: contributors | |
uses: openclimatefix/[email protected] | |
with: | |
orgName: ts-graphviz | |
- uses: actions/checkout@v3 | |
- run: sudo apt-get install -y moreutils | |
- name: Write to file | |
run: cat .all-contributorsrc | jq '.contributors = ${{steps.contributors.outputs.contributors}}' | sponge .all-contributorsrc | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Update README | |
run: yarn all-contributors generate | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
# Required | |
commit_message: Add latest contributors |