Skip to content

Update Profile Details #990

Update Profile Details

Update Profile Details #990

Workflow file for this run

name: Update Profile Details
on:
schedule:
# # At 18:30 UTC on everyday (12.00 mid night in Sri Lanka)
- cron: "30 18 * * *"
# Enables a button on Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master
with:
ref: main
# used for 'git log' command at python_scripts/update_profile_from_google_form.py line 154
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install gdown
pip install requests
pip install pillow
pip install googledrivedownloader
pip install pytz
- name: Update student profiles from Google Form
env:
GOOGLE_FORM_CSV_LINK: ${{ secrets.GOOGLE_FORM_CSV_LINK }}
run: |
cd ./python_scripts
python3 update_profile_from_google_form.py
cd ../
- name: Update postgrad students from Google Form
run: |
cd ./python_scripts
python3 update_postgrad_from_google_form.py
cd ../
- name: Resize student images
run: |
cd ./python_scripts
python3 resize_student_images.py
cd ../
- name: Commit and push into the main branch
run: |
git config user.name github-actions
git config user.email [email protected]
git add --all
git commit -m "Profiles were updated with the details from Google Form" || echo "No changes"
git push