Skip to content

Commit

Permalink
kaltura2youtube initial POC (#266)
Browse files Browse the repository at this point in the history
* start kaltura downloader

* kaltura test workflow

* get the skeleton code written; needs testing

* add gitignore

* seems to upload captions and video

* throw if headless

* remove debug
  • Loading branch information
reteps authored Dec 4, 2024
1 parent 9483007 commit 3f59561
Show file tree
Hide file tree
Showing 5 changed files with 450 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/deploy-sigpwny.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,44 @@ jobs:
with:
commit_message: "chore: update workflow schedule"
file_pattern: "*.yml"
kaltura-upload:
name: Upload to YouTube from Kaltura
if: github.ref_name == github.event.repository.default_branch
needs: deploy
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
token: ${{ secrets.WORKFLOW_PAT }}
submodules: true
fetch-depth: 0
- name: Initialize Astro and dependencies
uses: ./.github/actions/build-astro
with:
working-directory: ${{ env.CI_WORKING_DIR }}
build-directory: ${{ env.CI_BUILD_DIR }}
cache-directory: ${{ env.CI_CACHE_DIR }}
skip-build: true
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: pip install -r src/scripts/requirements.txt
working-directory: ${{ CI_WORKING_DIR }}
- name: Run Kaltura
run: python3 kaltura2youtube.py
shell: bash
working-directory: ${{ env.CI_WORKING_DIR }}/src/scripts
env:
KALTURA_USERNAME: ${{ secrets.KALTURA_USERNAME }}
KALTURA_PASSWORD: ${{ secrets.KALTURA_PASSWORD }}
YOUTUBE_OAUTH_CREDS: ${{ secrets.YOUTUBE_OAUTH_CREDS }}
- name: Save scheduled Discord pings
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update workflow schedule"
file_pattern: "*.yml"
4 changes: 3 additions & 1 deletion sigpwny.com/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ pnpm-debug.log*
.idea/

# vscode setting folder
.vscode/
.vscode/

client_secret*.json
14 changes: 13 additions & 1 deletion sigpwny.com/src/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,16 @@ Create a `.env` in `websites/sigpwny.com/src` containing
```
DISCORD_TOKEN=XXX
DISCORD_SERVER_ID=YYY
```
```

# Kaltura to Youtube Sync

Requires

```
KALTURA_USERNAME
KALTURA_PASSWORD
YOUTUBE_OAUTH_CREDS
```

parameters to work.
Loading

0 comments on commit 3f59561

Please sign in to comment.