-
Notifications
You must be signed in to change notification settings - Fork 5
73 lines (60 loc) · 1.97 KB
/
daily.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Daily Build
on:
schedule:
# # At 18:50 UTC on everyday (12.20 mid night in Sri Lanka)
- cron: "50 18 * * *"
# Enables a button on Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
webhook_url: ${{ secrets.NOTIFICATION_WEBHOOK_URL }}
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 pytz
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# -------------------------------------------------------------------------------------
- name: "Students API: Generate Student API files"
run: |
cd ./python_scripts
python3 students.py
cd ../
- name: "Staff API: Generate Academic Staff API files"
run: |
cd ./python_scripts
python3 staff.py
cd ../
- name: "Projects API: Generate Project files"
run: |
cd ./python_scripts
python3 projects.py
cd ../
- name: "Projects API: Filter the Projects by Student ENumbers and Tags"
run: |
cd ./python_scripts
python3 projects_filters.py
cd ../
- name: "Location API: Update location details from Google Sheet"
run: |
cd ./python_scripts
python3 locations.py
cd ../
# -------------------------------------------------------------------------------------
- name: Commit and push into the main branch
run: |
git config user.name github-actions
git config user.email [email protected]
git add --all
git commit -m "Daily build by GitHub Actions" || echo "No changes to commit on People API"
git push