Internetarchive-YouTube Sync #2516
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: Internetarchive-YouTube Sync | |
on: | |
workflow_dispatch: | |
push: | |
schedule: | |
- cron: '0 */6 * * *' | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
- name: Install dependencies | |
run: | | |
sudo apt-get update && sudo apt-get install aria2 -y | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install 'poetry>=1.1.13' | |
- name: Build | |
run: | | |
poetry build | |
pip install dist/*.whl | |
- name: Run main app | |
env: | |
ARCHIVE_USER_EMAIL: ${{ secrets.ARCHIVE_USER_EMAIL }} | |
ARCHIVE_PASSWORD: ${{ secrets.ARCHIVE_PASSWORD }} | |
CHANNELS: ${{ secrets.CHANNELS }} | |
MONGODB_CONNECTION_STRING: ${{ secrets.MONGODB_CONNECTION_STRING }} | |
JSONBIN_KEY: ${{ secrets.JSONBIN_KEY }} | |
CLI_OPTIONS: ${{ secrets.CLI_OPTIONS }} | |
run: | | |
ia configure --username="$ARCHIVE_USER_EMAIL" --password="$ARCHIVE_PASSWORD" | |
ia-yt --create-collection --no-logs | |
ia-yt --no-logs $(echo $CLI_OPTIONS) |