Skip to content

Update Stock Dividends DB (SQLite) #74

Update Stock Dividends DB (SQLite)

Update Stock Dividends DB (SQLite) #74

name: Update Stock Dividends DB (SQLite)
on:
workflow_run:
workflows: ['Update Ex Dividend Date Cache and DB (SQLite)']
types: [completed]
workflow_dispatch: # Enable manual trigger
jobs:
update-the-stock-dividend-database-based-on-ticker-datasets:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements.txt
- name: Update dividend database information
run: |
python StockTickers/create_and_update_dividend_database.py
- name: Add and commit updated dividend database
run: |
git config --global user.email "jpnewman167@gmail.com"
git config --global user.name "JNewman-cell"
git pull origin main
git add FlaskApp/dividend_data.db
git commit -m "Add updated dividend database" || echo "No changes to commit"
git push origin main