Skip to content

Commit 5a5bbd3

Browse files
committed
setup workflow
1 parent 3aa9304 commit 5a5bbd3

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Hourly speakers' corner updates
2+
3+
on:
4+
schedule:
5+
- cron: '55 * * * *'
6+
7+
8+
jobs:
9+
rotate:
10+
runs-on: ubuntu-latest
11+
name: Deploy
12+
13+
steps:
14+
- name: checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Set up Python 3.8
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: 3.8
21+
22+
- name: Install and build
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install requirements.txt
26+
python host_key_rotation.py
27+
env:
28+
ZOOM_API_KEY: ${{ secrets.ZOOM_API_KEY }}
29+
ZOOM_API_SECRET: ${{ secrets.ZOOM_API_SECRET }}
30+
HOST_KEY_SALT: ${{ secrets.HOST_KEY_SALT }}

host_key_rotation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,7 @@ def rotate_meetings():
9696
f"{common.ZOOM_API}meetings/{meeting['id']}",
9797
data=json.dumps({"settings": {"join_before_host": False}}),
9898
)
99+
100+
if __name__ == "__main__":
101+
update_host_key()
102+
rotate_meetings()

requrements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
requests
2+
pytz
3+
dateutil

0 commit comments

Comments
 (0)