-
Notifications
You must be signed in to change notification settings - Fork 13
33 lines (31 loc) · 1.03 KB
/
cron-codes.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: cron-codes
on:
schedule:
# Cron job every day at 12:00
# https://crontab.guru/#0_12_*_*_*
- cron: '0 0 * * *'
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/codes.js
(git add src/codes.json && git commit -m 'build(cron): update option codes' --no-verify && git push) || true
curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/030f1771-be5f-4240-b3ad-b1f5b0a059e6