forked from covid19india/api
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (53 loc) · 1.74 KB
/
Copy pathjavascript.yml
File metadata and controls
58 lines (53 loc) · 1.74 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Sheet to Json Workflow
on:
schedule:
# every 10 minutes the job will run
- cron: "*/10 * * * *"
push:
branches:
- master
jobs:
update-json-data:
runs-on: ubuntu-latest
timeout-minutes: 9
steps:
- uses: actions/checkout@v2
- run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
- name: Cache node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm install
- name: push
run: |
bash ./main.sh 2>> /tmp/apidata_err
echo "the job completed"
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
SHEET_ID_v1: ${{ secrets.SHEET_ID_v1 }}
SHEET_ID_v2: ${{ secrets.SHEET_ID_v2 }}
SHEET_ID_v3: ${{ secrets.SHEET_ID_v3 }}
SHEET_ID_v4: ${{ secrets.SHEET_ID_v4 }}
SHEET_ID_v5: ${{ secrets.SHEET_ID_v5 }}
RESOURCES_SHEET_ID: ${{ secrets.RESOURCES_SHEET_ID }}
STUCK_BOT: ${{ secrets.STUCK_BOT }}
- name: show job status
if: always()
run: |
git checkout master
node lib/notify_tg.js $status
env:
status: ${{job.status}}
STUCK_BOT: ${{ secrets.STUCK_BOT }}
GITHUB_TOKEN: ${{ secrets.github_token }}
#trigger the action
#trigger the action by remove this line