-
-
Notifications
You must be signed in to change notification settings - Fork 76
54 lines (48 loc) · 1.58 KB
/
video-todo-generator.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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.");
}