-
-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (49 loc) · 1.9 KB
/
zoom-upload.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
name: Upload Zoom Recordings to YouTube
on:
schedule:
# 10 minutes after every hour on weekdays
- cron: "10 * * * 1-5"
workflow_dispatch:
inputs:
delete_after_upload:
description: 'Delete recordings from Zoom after uploading to YouTube'
type: boolean
default: true
dry_run:
description: 'Dry run: report planned work, but do not actually upload or change anything'
type: boolean
default: false
pull_request: {}
jobs:
zoom_to_youtube:
name: Upload Zoom to YouTube
runs-on: ubuntu-latest
steps:
- name: Install ffmpeg
run: |
sudo apt-get update
sudo apt-get install ffmpeg
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Decrypt Credential Files
env:
EDGI_ZOOM_API_SECRET: ${{ secrets.EDGI_ZOOM_API_SECRET }}
run: |
openssl aes-256-cbc -k "$EDGI_ZOOM_API_SECRET" -in client_secret.json.enc -out client_secret.json -d -md sha256
openssl aes-256-cbc -k "$EDGI_ZOOM_API_SECRET" -in .youtube-upload-credentials.json.enc -out .youtube-upload-credentials.json -d -md sha256
- name: Upload
env:
EDGI_ZOOM_DELETE_AFTER_UPLOAD: ${{ github.event_name == 'schedule' || inputs.delete_after_upload }}
EDGI_DRY_RUN: ${{ github.event_name == 'pull_request' || inputs.dry_run }}
DEFAULT_YOUTUBE_PLAYLIST: ${{ secrets.DEFAULT_YOUTUBE_PLAYLIST }}
EDGI_ZOOM_ACCOUNT_ID: ${{ secrets.EDGI_ZOOM_ACCOUNT_ID }}
EDGI_ZOOM_CLIENT_ID: ${{ secrets.EDGI_ZOOM_CLIENT_ID }}
EDGI_ZOOM_CLIENT_SECRET: ${{ secrets.EDGI_ZOOM_CLIENT_SECRET }}
run: |
python3 scripts/upload_zoom_recordings.py