forked from PaddlePaddle/FastDeploy
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.37 KB
/
CheckPRTemplate.yml
File metadata and controls
54 lines (46 loc) · 1.37 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
48
49
50
51
52
53
54
name: Check PR Template
on:
pull_request:
branches:
- develop
- 'release/*'
jobs:
check:
name: Check PR Template
if: ${{ github.repository_owner == 'PaddlePaddle' }}
runs-on: ubuntu-latest
env:
PR_ID: ${{ github.event.pull_request.number }}
BASE_BRANCH: ${{ github.event.pull_request.base.ref }}
AUTHOR: ${{ github.event.pull_request.user.login }}
steps:
- name: Cleanup
run: |
rm -rf * .[^.]*
- name: Checkout base branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}
fetch-depth: 1000
- name: Merge PR to test branch
run: |
git fetch origin pull/${PR_ID}/merge
git checkout -b test FETCH_HEAD
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install httpx
- name: Check PR Template
env:
AGILE_PULL_ID: ${{ env.PR_ID }}
AGILE_COMPILE_BRANCH: ${{ env.BASE_BRANCH }}
AGILE_CHECKIN_AUTHOR: ${{ env.AUTHOR }}
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python scripts/CheckPRTemplate.py; EXCODE=$?
exit $EXCODE