-
-
Notifications
You must be signed in to change notification settings - Fork 124
47 lines (41 loc) · 1.24 KB
/
Copy pathdocument-merged-prs.yml
File metadata and controls
47 lines (41 loc) · 1.24 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
41
42
43
44
45
46
47
name: Document Merged PRs
on:
schedule:
# Run every day at 12 AM UTC (adjust if you want IST)
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: write
issues: read
pull-requests: read
jobs:
document-merged-prs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Generate merged PR documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.event.repository.name }}
run: |
node .github/scripts/generate-merged-prs-doc.js
- name: Commit and push changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add MERGED_PRS.md
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Auto-update MERGED_PRS.md [skip ci]"
git pull --rebase origin main
git push origin main
fi