-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (41 loc) · 1.15 KB
/
course-update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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 }}