Update MAP-E Data #2
This file contains hidden or 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 MAP-E Data | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 3 * * 1" | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-rules: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Update data | |
| run: node scripts/update-rules.mjs | |
| - name: Run tests | |
| run: node test.js | |
| - name: Commit changes | |
| run: | | |
| if git diff --quiet; then | |
| echo "No changes to commit" | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add rules.js | |
| git commit -m "chore: update MAP-E data" | |
| git push |