Youtube Daily Pull #4
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: Youtube Daily Pull | |
permissions: | |
contents: write | |
pull-requests: write | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" # Runs daily at midnight UTC | |
jobs: | |
update-data: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ secrets.NKDAGILITY_BOT_APP_ID }} | |
private-key: ${{ secrets.NKDAGILITY_BOT_CLIENTSECRET }} | |
# Step 1: Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Update-YoutubeChannelData | |
shell: pwsh | |
run: ./.powershell/build/Update-YoutubeChannelData.ps1 | |
env: | |
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }} | |
GOOGLE_ACCESS_TOKEN: ${{ secrets.GOOGLE_ACCESS_TOKEN }} | |
GOOGLE_REFRESH_TOKEN: ${{ secrets.GOOGLE_REFRESH_TOKEN }} | |
GOOGLE_CLINET_ID: ${{ secrets.GOOGLE_CLINET_ID }} | |
GOOGLE_CLINET_SECRET: ${{ secrets.GOOGLE_CLINET_SECRET }} | |
- name: Update-YoutubeMarkdownFiles | |
shell: pwsh | |
run: ./.powershell/build/Update-YoutubeMarkdownFiles.ps1 | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
# Step 6: Create or update the pull request | |
- name: Create or update Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
branch: "youtube-daily-update" | |
base: main | |
committer: NKDARobot[bot] <NKDARobot[bot]@noreply.nkdagility.com> | |
title: "Youtube Daily Pull" | |
body: "This pull request contains daily updates from the automated workflow." | |
reviewers: mrhinsh |