Skip to content

Update README.md

Update README.md #233

name: Update and Upload Giga Banks Data
on:
workflow_dispatch:
push: # Specifies that the branch should run on a push event
branches:
- main # Name of default branch for 'Concentration-of-Banking' repository
schedule:
- cron: '0 0 1 1,4,7,10 *' # At 00:00 on day-of-month 1 in Jan., Apr., Jul., and Oct.
jobs:
update_and_upload: # This is a specific job within the workflow (the name is a variable for the job)
runs-on: ubuntu-latest # Specifies the runner that the runner will run on. A runner is a virtual machine or container that executes the job's steps
steps:
- name: Checkout repo content
uses: actions/checkout@v2 # Github action provided by GitHub to clone repositories.
- name: Set up Python 3.8
uses: actions/setup-python@v2 # Ensures that 'python' and 'pip' commands in subsequent steps run using Python 3.8.
with:
python-version: 3.8 # Specifically identifies which version of Python is to be used.
- name: Install dependencies
run: |
pip install yfinance pandas
- name: Run the script to update data
run: |
python ./scripts/giga_banks.py
- name: Commit and push if there are changes
run: |
git config --global user.email "juan.torres2012@gmail.com"
git config --global user.name "GitHub Actions"
git add datasets/giga_banks_ownership.csv
git commit -m "Automatically update Giga Banks data" || echo "No changes to commit"
git -c http.extraHeader="AUTHORIZATION: bearer ${{ secrets.PAT }}" push