Skip to content

GPA Checker

GPA Checker #5683

Workflow file for this run

name: GPA Checker
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 */2 * * *"
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install dependencies
run: |
pip3 install cryptography
pip3 install beautifulsoup4
pip3 install requests
- name: Run Python script and get result
id: run_script
run: |
STD_ID=${{ secrets.STD_ID }} PASSWORD=${{ secrets.PASSWORD }} TOKEN=${{ secrets.TOKEN }} python3 main.py > result.txt
echo "RESULT=$(cat result.txt)" >> $GITHUB_ENV
- name: Conditional update
if: contains(env.RESULT, 'update')
run: |
git config --global user.email "21307130094@m.fudan.edu.cn"
git config --global user.name "Boreas618"
git add *
git commit -m "Automatic update of records"
git push origin main