Skip to content

Update Data Workflow #5

Update Data Workflow

Update Data Workflow #5

name: Update Data Workflow
on:
schedule:
- cron: '0 10 * * *' # Run every day at 10:00 UTC
workflow_dispatch: # Allows manual triggering of the workflow
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.11.8'
- name: Install dependencies
run: |
pip install pandas gspread oauth2client
- name: Write credentials to file
run: |
echo '${{ secrets.GOOGLE_CREDENTIALS }}' > omoku-analysis-cred_key.json
env:
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
- name: Run the update script
run: python update_data.py
- name: Commit and push if changes
run: |
git config --global user.name 'Isaiah Akorita'
git config --global user.email 'akoritaisaiah@gmail.com'
git add -A
git commit -m "Automated data update" || echo "No changes to commit"
git push