SteamBadgesDB-self-update #17021
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: 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@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
check-latest: true | |
- 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@v4 | |
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 SteamCardExchange Scrapper | |
run: npm start | |
- name: Sync Changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
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' |