Skip to content

Update Project and Publication Details #886

Update Project and Publication Details

Update Project and Publication Details #886

name: Update Project and Publication Details
on:
schedule:
# # At 18:40 UTC on everyday (12.10 mid night in Sri Lanka) This will collect the results from API site, which build at 12 mid night
- cron: "40 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
- 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 requests
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Update Student Project Details
run: |
cd ./python_scripts
python3 update_projects.py
cd ../
- name: Update Student/Staff Publication Details
run: |
cd ./python_scripts
python3 update_publications.py
cd ../
- name: Commit and push into the main branch
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add --all
git commit -m "Student Project and Publication details were updated by GitHub Actions" || echo "No changes on Projects and Publications"
git push