-
-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (49 loc) · 1.23 KB
/
dailyReset.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Run scripts on Daily Reset
on:
workflow_dispatch:
push:
branches:
- main
paths:
- ".github/workflows/dailyReset.yml"
- "scripts/**.js"
- "functions/**.js"
- package.json
- package-lock.json
schedule:
- cron: "0 17 * * *"
- cron: "5 * * * *"
jobs:
daily:
name: Run scripts on Daily Reset
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
uses: actions/checkout@v3
- name: "Setup Node.js"
uses: actions/setup-node@v3
with:
node-version: "current"
cache: "npm"
- name: "Clean Install"
run: npm ci
- name: "Run"
run: npm run scripts
env:
BUNGIE_API_KEY: ${{ secrets.BUNGIE_API_KEY }}
- name: "Check for Updates"
uses: dorny/paths-filter@v2
id: updates
with:
base: HEAD
filters: |
data:
- "data/**.json"
- name: "Commit Data"
if: steps.updates.outputs.data == 'true'
run: |
git config user.name "CostasAK"
git config user.email "CostasAK@users.noreply.github.com"
git add data/.
git commit -am "Automated Data Commit"
git push