Daily update from GSheet #541
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Daily update from GSheet | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 2,14 * * *' | |
permissions: | |
contents: write | |
jobs: | |
update: | |
name: Daily update from the Google Spreadsheet | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: pip3 install --user requests | |
- name: Get snapshot from GSheet | |
run: python3 scripts/get_snapshot.py | |
- name: Update Git repository | |
run: | | |
git config user.name "Auto updater" | |
git config user.email github-actions@github.com | |
git add data/ | |
git commit -m "Auto update $(date +'%Y-%m-%d')" || true | |
git push origin ${GITHUB_REF_NAME} |