nse-eod-data #956
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: nse-eod-data | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 16 * * 1-5' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v2 # checkout the repository content to github runner | |
- name: setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' # install the python version needed | |
- name: install pipenv and dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade pipenv wheel | |
- id: cache-pipenv | |
uses: actions/cache@v1 | |
with: | |
path: ~/.local/share/virtualenvs | |
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} | |
- name: Install dependencies | |
if: steps.cache-pipenv.outputs.cache-hit != 'true' | |
run: | | |
pipenv install --dev | |
- name: execute py script # run endofday_data.py to get the latest data | |
run: pipenv run python endofday_data.py | |
- name: commit & push files | |
run: | | |
git config --local user.email [email protected] | |
git config --local user.name ajakaiye33 | |
git add -A | |
timestamp=$(date --rfc-2822) | |
git commit -m "updated data:${timestamp}" || exit 0 | |
git push |