Upload Zoom Recordings to YouTube #2080
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: 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 |