-
-
Notifications
You must be signed in to change notification settings - Fork 6
54 lines (54 loc) · 1.31 KB
/
buildv3.yaml
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
name: "[v3] Generate Database"
on:
workflow_dispatch:
schedule:
- cron: "0 5 * * *"
push:
branches:
- v3
paths:
- "generator/*"
- "requirements.txt"
- "api/index.py"
- "api/robots.txt"
- "api/favicon.ico"
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
Build:
name: Build Database
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
ref: v3
- name: Load secrets to environment variables
uses: oNaiPs/secrets-to-env-action@v1
with:
secrets: ${{ toJSON(secrets) }}
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Update JSON File with main.py and then commit
shell: pwsh
run: |
try {
python3 generator
git config --local user.email "[email protected]"
git config --local user.name "Natsu Tadama"
git add .
git commit -m "Update JSON for v3"
git push
}
catch {
write-host "No changes made"
}