Update Library Index Task #22564
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 Library Index Task | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '42 * * * *' | |
jobs: | |
exporter: | |
runs-on: ubuntu-20.04 | |
name: Update Library Index | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Install NPM dependencies | |
run: npm ci | |
- name: Fetch library index | |
run: npm start | |
- name: Commit changes | |
run: | | |
git add -A | |
git config user.email "librarian@wokwi.com" | |
git config user.name "Wokwi Update" | |
if ! git diff-index --quiet HEAD; then | |
git commit -m "sync $(date -u +%Y-%m-%dT%H:%M:%SZ)" | |
fi | |
- name: Push changes | |
run: git push |