Skip to content

Update Database with SEC Data (CIK, Ticker, Exchange, Company Name) #1

Update Database with SEC Data (CIK, Ticker, Exchange, Company Name)

Update Database with SEC Data (CIK, Ticker, Exchange, Company Name) #1

Workflow file for this run

name: Update Database with SEC Data (CIK, Ticker, Exchange, Company Name)
on:
schedule:
- cron: '30 23 * * *' # Runs every day at 23:30
workflow_dispatch: # Allows manual triggering
concurrency:
group: database-update
jobs:
update-data:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: pip install requests pandas gspread oauth2client
- name: Pull SEC data and update repository
run: python src/scripts/SEC_company_tickers_exchange.py
- name: Update Database from JSON
run: python src/scripts/update_db_from_json.py
- name: Verify changes
run: |
echo "Checking for changes in data files..."
git status
- name: Commit and push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add data/company_tickers_exchange.json data/Full_Database_Backend.db
git commit -m "Updated database with SEC data"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}