Skip to content

Fetch Grades

Fetch Grades #10

Workflow file for this run

name: Fetch Grades
on:
workflow_dispatch:
jobs:
fetch-grades:
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Homebrew
run: |
/bin/bash -c "$(curl -fsSL https://github.com/raw/Homebrew/install/HEAD/install.sh)"
- name: Install Requirements
run: |
python -m pip install -r requirements.txt
- name: Run Script
env:
PSA_USERNAME: ${{ secrets.PSA_USERNAME }}
PSA_PASSWORD: ${{ secrets.PSA_PASSWORD }}
FTP_HOST: ${{ secrets.FTP_HOST }}
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
run: |
echo "${{ secrets.PICKLE_FILE }}" | base64 -d > token.pickle
echo "${{ secrets.CREDENTIALS_FILE }}" | base64 -d > credentials.json
python basic.py
- name: Add Files
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add Submissions/*.txt
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit"
exit 0
fi
git commit -m "Add new files"
git remote set-url origin https://${{ github.repository_owner }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git push origin main