-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.15 KB
/
readmes.yml
File metadata and controls
40 lines (34 loc) · 1.15 KB
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
name: Update READMEs PR
on:
push:
branches:
- main
jobs:
update-readmes:
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # Ensures full Git history is available for diff commands
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Generate READMEs
run: npm run generate-readmes
- name: Create or update Pull Request for READMEs
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-readmes # Use a fixed branch to auto-update the PR
title: "chore: update READMEs"
commit-message: "chore: update READMEs"
body: "This pull request contains the updated READMEs generated by the workflow."
base: main
update-existing: true # Ensures that an existing PR on this branch is updated rather than creating a new one