SteamBadgesDB-self-update #25073
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: SteamBadgesDB-self-update | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # * is a special character in YAML so we have to quote this string | |
| - cron: '0 */1 * * *' # every 1 hour | |
| jobs: | |
| self-update: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 'lts/*' | |
| check-latest: true | |
| - name: Setup NPM | |
| run: npm install -g npm@latest | |
| - name: Verify Node.js Version | |
| run: node --version | |
| - name: Verify npm Version | |
| run: npm --version | |
| - name: Cache Node.js Modules | |
| id: cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: node_modules | |
| key: node-modules-${{ hashFiles('package-lock.json') }} | |
| enableCrossOsArchive: true | |
| - name: Install npm Dependencies | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: npm ci --production | |
| - name: Run Scrapper | |
| run: npm start | |
| - name: Sync Changes | |
| uses: stefanzweifel/git-auto-commit-action@v7 | |
| with: | |
| commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | |
| commit_message: 'chore(badges): automatic badges.json update' | |
| file_pattern: 'data/*.json' |