-
-
Notifications
You must be signed in to change notification settings - Fork 76
50 lines (44 loc) · 1.43 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
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]
- 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: |
video-todo-generator: update video list
labels: bot
- name: Label this PR as "automerge"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.PERSONAL_TOKEN }}
script: |
const pullNumber = ${{ steps.create-pr.outputs.pull-request-number }};
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.");
}