Skip to content

Semester Data Update #20011

Semester Data Update

Semester Data Update #20011

Workflow file for this run

name: Semester Data Update
on:
schedule:
- cron: "0 * * * *"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
strategy:
matrix:
semester: [summer-2023]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-parser-${{ hashFiles('rpi_data/modules/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-parser
- name: Install parser dependencies
run: pip install -r requirements.txt
working-directory: rpi_data/modules
- name: Get course data
run: bash $SCRIPT_NAME
working-directory: rpi_data
env:
SCRIPT_NAME: get-${{ matrix.semester }}.sh
- name: Update prod
run: |
curl -X POST -H "Content-Type: multipart/form-data" -F "isPubliclyVisible=on" -F "file=@$FILE_NAME" -A "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0" $AUTH_ARGS $API_ENDPOINT
env:
FILE_NAME: ${{ matrix.semester }}.csv
AUTH_ARGS: ${{ secrets.AUTH_ARGS }}
API_ENDPOINT: ${{ secrets.UPDATE_API_ENDPOINT }}
working-directory: rpi_data