Skip to content

cron-prices

cron-prices #1953

Workflow file for this run

name: cron-prices
on:
schedule:
# Cron job every day 12 hours
# https://crontab.guru/every-12-hours
- cron: '0 */12 * * *'
workflow_dispatch: # This line enables manual triggering of the workflow
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: latest
run_install: true
- name: Cron
run: |
git config --global user.email ${{ secrets.GIT_EMAIL }}
git config --global user.name ${{ secrets.GIT_USERNAME }}
DEBUG='tesla-inventory*' node scripts/prices.js
(git add src/prices && git commit -m 'build(cron): update option codes prices' --no-verify && git push) || true
curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/85db5da6-4b8e-4025-b556-308398909dae