Update rooms.json #601
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update rooms.json | |
on: | |
push: | |
paths-ignore: | |
- 'data/**' | |
schedule: | |
- cron: '44 3 * * 0-5' # Weekdays + Sunday for weekend drops/adds @ 10:44/11:44 PM EST/EDT (+ ~11min GH delay) | |
workflow_dispatch: | |
jobs: | |
course-updater: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v3 | |
- run: dir | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
cache-dependency-path: modules.txt | |
- run: pip install -r modules.txt | |
- name: Run convert.py | |
run: python convert.py | |
- name: Run library.py | |
run: python library.py | |
- name: Run dining.py | |
run: python dining.py | |
- name: Push updates | |
run: | | |
git add -A | |
if [ -n "$(git status --porcelain)" ]; then | |
git config user.name "Vacansee" | |
git config user.email "[email protected]" | |
git commit -m "Updated on $(TZ=EST5EDT date)" | |
git push origin $branch | |
else | |
echo "No changes to commit" | |
fi | |
env: | |
branch: ${{ github.ref_name }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} |