Run iosRefScraper #2349
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: Run iosRefScraper | |
| on: | |
| schedule: | |
| - cron: '0 */3 * * *' # Runs every 3 hours | |
| workflow_dispatch: # Allows manual triggering of the workflow | |
| jobs: | |
| run-iosRefScraper: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: Clean and install dependencies | |
| run: | | |
| rm -rf node_modules | |
| npm install | |
| - name: Run iosRefScraper | |
| run: node tools/iosRefScraper.js | |
| - name: Commit changes | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git add devutils/devicelist.json | |
| git commit -m "Update devicelist.json via GitHub Actions" || echo "No changes to commit" | |
| git push | |