Skip to content

Create PR for youtube videos #1

Create PR for youtube videos

Create PR for youtube videos #1

Workflow file for this run

name: Create PR for youtube videos
on:
schedule:
- cron: "00 00 * * *"
workflow_dispatch:
inputs:
days:
description: "Number of days before today to check for new videos"
required: false
default: "5"
jobs:
youtube-bot:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: "arash77"
repositories: "galaxy-social-main"
- name: Run python script
env:
GALAXY_SOCIAL_BOT_TOKEN: ${{ steps.generate-token.outputs.token }}
REPO: "arash77/galaxy-social-main"
DAYS: ${{ github.event.inputs.days || '5' }}
run: python -u app/youtube_bot.py