Skip to content

Update CSV

Update CSV #631

Workflow file for this run

name: Update CSV
on:
schedule:
# Runs every 4 hours
- cron: '0 */4 * * *'
workflow_dispatch: # This line allows manual trigger
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install gdown
- name: Download CSV from Google Docs
run: |
# This assumes that your Google Docs file is publicly accessible
gdown "https://docs.google.com/spreadsheets/d/1NdCOLpp6u8EHpN6SpeSAwxiJYivawi0YFznZ6AN7fKk/export?format=csv" -O "bbwEvents.csv"
- name: Check for changes and commit
run: |
if ! diff "bbwEvents.csv" ./events.csv ; then
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
cp "bbwEvents.csv" ./events.csv
git add ./events.csv
git commit -m "Update CSV file"
git push
fi