Skip to content

Commit 51b2698

Browse files
committed
fix: pr check
1 parent f44c83b commit 51b2698

2 files changed

Lines changed: 29 additions & 23 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PullLint
1+
name: ClosePR
22
on:
33
pull_request_target:
44
types: [assigned, opened, synchronize, reopened]
@@ -18,25 +18,3 @@ jobs:
1818
with:
1919
# Optional. Post a issue comment just before closing a pull request.
2020
comment: "非法PR. 请`fork`后修改自己的仓库, 而不是向主仓库提交更改. 如果您确信您的PR是为了给主仓库新增功能或修复bug, 请更改默认PR标题. **注意**: 如果您再次触发本提示, 则有可能导致账号被封禁."
21-
22-
golangci:
23-
needs: close-pr
24-
if: ${{ !contains(github.event.pull_request.title, '.go') }}
25-
uses: ./.github/workflows/lib_lint.yml
26-
with:
27-
ref: ${{ github.event.pull_request.head.sha }}
28-
commit_back: false
29-
30-
runmain:
31-
needs: golangci
32-
if: ${{ !contains(github.event.pull_request.title, '.go') }}
33-
uses: ./.github/workflows/lib_run.yml
34-
with:
35-
ref: ${{ github.event.pull_request.head.sha }}
36-
37-
build:
38-
needs: [runmain]
39-
uses: ./.github/workflows/lib_build.yml
40-
with:
41-
prefix: "zbp_"
42-
upload_artifact: false

.github/workflows/pr.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: PR Check
2+
on:
3+
workflow_run:
4+
workflows: [ClosePR]
5+
types:
6+
- completed
7+
8+
jobs:
9+
golangci:
10+
if: ${{ !contains(github.event.pull_request.title, '.go') }}
11+
uses: ./.github/workflows/lib_lint.yml
12+
with:
13+
ref: ${{ github.event.pull_request.head.sha }}
14+
commit_back: false
15+
16+
runmain:
17+
needs: golangci
18+
if: ${{ !contains(github.event.pull_request.title, '.go') }}
19+
uses: ./.github/workflows/lib_run.yml
20+
with:
21+
ref: ${{ github.event.pull_request.head.sha }}
22+
23+
build:
24+
needs: [runmain]
25+
uses: ./.github/workflows/lib_build.yml
26+
with:
27+
prefix: "zbp_"
28+
upload_artifact: false

0 commit comments

Comments
 (0)