Skip to content

Commit 96e596e

Browse files
authored
ci(pr): add pr-ci (#64)
1 parent 73f8d2c commit 96e596e

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/pr-ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: PR CI
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- edited
7+
- synchronize
8+
- reopened
9+
permissions:
10+
pull-requests: read
11+
jobs:
12+
pr-title:
13+
name: Validate PR title
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 10
16+
steps:
17+
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
18+
with:
19+
requireScope: true
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
pr-body:
23+
name: PR body empty check
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 10
26+
steps:
27+
- run: |
28+
if [[ "$PR_BODY" == "" ]]; then
29+
echo "PR body is empty"
30+
exit 1
31+
fi
32+
env:
33+
PR_BODY: ${{ github.event.pull_request.body }}

0 commit comments

Comments
 (0)