-
Notifications
You must be signed in to change notification settings - Fork 146
56 lines (49 loc) · 1.77 KB
/
code_generators.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
52
53
54
55
56
name: Run All Code Generators
on:
schedule:
- cron: "0 10 * * 5" # Runs "at 10 UTC every Friday" (see https://crontab.guru)
workflow_dispatch: # Run on manual trigger
jobs:
run_matrix:
strategy:
fail-fast: false
matrix:
script: [Alternative-Datasets-Code-Generator,
API-Reference-Code-Generator,
enum-table-generator,
fred-categories-table-code-generator,
fundamentals-table-code-generator,
future-table-code-generator,
get-libraries,
glossary-generator,
market-hour-code-generator,
security-portfolio-table-generator,
Supported-Assets-Table-Code-Generator,
us-energy-indicators-code-generator,
Writing-Algorithm-API-Ref-Code-Generator
]
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: |-
python -m pip install --upgrade pip
pip install numpy==1.22.3
pip install pandas==1.4.2
- name: Free space
run: df -h && rm -rf /opt/hostedtoolcache* && df -h
- name: Run ${{ matrix.script }} Python Script
run: python code-generators/${{ matrix.script }}.py
- name: Push to Branch
run: |-
if [[ $(git diff | wc -m) == 0 ]]; then
exit 0
fi
BRANCH=github-action-${{matrix.script}}
git config user.name GitHub Actions
git config user.email [email protected]
git checkout -b $BRANCH
git add .
git commit -m "Code generated by ${{ matrix.script }}.py"
git push --set-upstream origin $BRANCH -f