Skip to content

nse-eod-data

nse-eod-data #961

Workflow file for this run

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