forked from eslint/eslint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Set up automatic updating of README (eslint#16717)
* chore: Set up automatic updating of README * Update tools/update-readme.js Co-authored-by: Milos Djermanovic <[email protected]> Co-authored-by: Milos Djermanovic <[email protected]>
- Loading branch information
1 parent
4e4049c
commit 8f17247
Showing
5 changed files
with
127 additions
and
34 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Data Fetch | ||
|
||
on: | ||
schedule: | ||
- cron: "0 8 * * *" # Every day at 1am PDT | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.WORKFLOW_PUSH_BOT_TOKEN }} | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
|
||
- name: Install npm packages | ||
run: npm install | ||
|
||
- name: Update README with latest team and sponsor data | ||
run: npm run build:readme | ||
|
||
- name: Setup Git | ||
run: | | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "<[email protected]>" | ||
- name: Save updated files | ||
run: | | ||
chmod +x ./tools/commit-readme.sh | ||
./tools/commit-readme.sh |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
#------------------------------------------------------------------------------ | ||
# Commits the data files if any have changed | ||
#------------------------------------------------------------------------------ | ||
|
||
if [ -z "$(git status --porcelain)" ]; then | ||
echo "Data did not change." | ||
else | ||
echo "Data changed!" | ||
|
||
# commit the result | ||
git add README.md | ||
git commit -m "docs: Update README" | ||
|
||
# push back to source control | ||
git push origin HEAD | ||
fi |
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