Video Todo Generator #252
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: Video Todo Generator | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
generate-readme-file: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 # Fetch all history | |
- name: Install Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: Generate new VIDEO.md file | |
run: bun .github/scripts/video-todo-generator.ts | |
- name: Create Pull Request | |
id: create-pr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.PERSONAL_TOKEN }} | |
commit-message: | | |
docs: regenerate video app list | |
# committer: GitHub <[email protected]> | |
# author: GitHub <[email protected]> | |
branch: bot/video-todo-update | |
title: | | |
readme-generator: update readme | |
labels: bot | |
- name: Label this PR as "automerge" | |
uses: actions/github-script@v7 | |
env: | |
PULL_NUMBER: ${{ steps.create-pr.outputs.pull-request-number }} | |
with: | |
github-token: ${{ secrets.PERSONAL_TOKEN }} | |
script: | | |
const pullNumber = process.env.PULL_NUMBER ? parseInt(process.env.PULL_NUMBER) : null; | |
if (pullNumber) { | |
github.rest.issues.addLabels({ | |
issue_number: pullNumber, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
labels: ["automerge"] | |
}); | |
} else { | |
console.log("No pull request number found."); | |
} |