-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (29 loc) · 948 Bytes
/
stitchmd.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
name: Stitch README.md
on:
push:
branches: [main]
# Change the event to pull_request_target
# so that it runs in the context of the base repository.
pull_request_target:
jobs:
stitchmd:
name: ${{ github.event_name == 'pull_request_target' && 'Update' || 'Check' }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Check or update README
uses: abhinav/stitchmd-action@v1
with:
mode: ${{ github.event_name == 'pull_request_target' && 'write' || 'check' }}
summary: doc/README.md
output: README.md
- uses: stefanzweifel/git-auto-commit-action@v5
if: ${{ github.event_name == 'pull_request_target' }}
with:
file_pattern: README.md
commit_message: 'Update README.md'