Harvest Prices #234
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: Harvest Prices | |
| on: | |
| schedule: | |
| - cron: "0 * * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: harvest-prices | |
| cancel-in-progress: false | |
| jobs: | |
| harvest: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| - run: node scripts/harvest-prices.mjs --api-only | |
| - name: Commit snapshot if changed | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add src/config/pricing.snapshot.json | |
| git diff --quiet --cached -- src/config/pricing.snapshot.json || git commit -m "chore: update pricing snapshot (hourly API)" | |
| git push |