Set up GitHub workflow to update Google Sheet #1
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
# update google sheets | |
name: Update Google Sheets | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
jobs: | |
update-sheet: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.8' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client | |
- name: Update Google Sheets | |
env: | |
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} | |
run: echo "${GOOGLE_SHEETS_CREDENTIALS}" > credentials.json | |
python update_matrix.py |