mirror of
https://github.com/RubyMetric/chsrc
synced 2025-07-01 00:52:43 +08:00
Fix run condition for PR
This commit is contained in:
parent
6120d98688
commit
c53bd62534
11
.github/workflows/PR-notify.yml
vendored
11
.github/workflows/PR-notify.yml
vendored
@ -4,7 +4,7 @@
|
|||||||
# Contributors : Nul None <nul@none.org>
|
# Contributors : Nul None <nul@none.org>
|
||||||
# |
|
# |
|
||||||
# Created On : <2025-06-19>
|
# Created On : <2025-06-19>
|
||||||
# Last Modified : <2025-06-20>
|
# Last Modified : <2025-06-28>
|
||||||
#
|
#
|
||||||
# Notify PR
|
# Notify PR
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
@ -22,7 +22,8 @@ jobs:
|
|||||||
enforce-dev-branch:
|
enforce-dev-branch:
|
||||||
name: 强制使用dev分支
|
name: 强制使用dev分支
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.pull_request_target.base.ref != 'dev'
|
# github.event.pull_request_target 内容为空,转而用 pull_request
|
||||||
|
if: github.event.pull_request.base.ref != 'dev'
|
||||||
steps:
|
steps:
|
||||||
- name: 评论
|
- name: 评论
|
||||||
uses: thollander/actions-comment-pull-request@v3
|
uses: thollander/actions-comment-pull-request@v3
|
||||||
@ -31,17 +32,13 @@ jobs:
|
|||||||
❤️ 感谢你的贡献!你的 PR 当前基于 ${{github.base_ref}} 分支,请修改使用 `dev` 分支!
|
❤️ 感谢你的贡献!你的 PR 当前基于 ${{github.base_ref}} 分支,请修改使用 `dev` 分支!
|
||||||
comment-tag: "❤️ 感谢你的贡献!"
|
comment-tag: "❤️ 感谢你的贡献!"
|
||||||
- run: |
|
- run: |
|
||||||
echo "github.event.pull_request_target.base.label = [${{github.event.pull_request_target.base.label}}]"
|
|
||||||
echo "github.event.pull_request_target.base.ref = [${{github.event.pull_request_target.base.ref}}]"
|
|
||||||
echo "github.event.pull_request.base.label = [${{github.event.pull_request.base.label}}]"
|
|
||||||
echo "github.event.pull_request.base.ref = [${{github.event.pull_request.base.ref}}]"
|
|
||||||
echo "::error::❌ PR 必须以 dev 分支为目标!当前是 ${GITHUB_BASE_REF}"
|
echo "::error::❌ PR 必须以 dev 分支为目标!当前是 ${GITHUB_BASE_REF}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
welcome:
|
welcome:
|
||||||
name: 欢迎PR者
|
name: 欢迎PR者
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.pull_request_target.base.ref == 'dev'
|
if: github.event.pull_request.base.ref == 'dev'
|
||||||
steps:
|
steps:
|
||||||
- name: 评论
|
- name: 评论
|
||||||
if: github.event.pull_request.type == 'opened'
|
if: github.event.pull_request.type == 'opened'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user