-
Notifications
You must be signed in to change notification settings - Fork 138
54 lines (47 loc) · 1.82 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
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,
fred-categories-table-code-generator,
fundamentals-table-code-generator,
future-table-code-generator,
glossary-generator,
Lean-CLI-API-Reference-Code-Generator,
market-hour-code-generator,
Supported-Assets-Table-Code-Generator,
us-energy-indicators-code-generator,
writing-algorithm-api-reference-sphinx-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 beautifulsoup4==4.12.3
pip install pandas==1.4.2
- name: Free space
run: df -h && rm -rf /usr/share/dotnet && sudo rm -rf /usr/local/lib/android && sudo rm -rf /opt/ghc && 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