Merge pull request #28673 from vizv/add-source-branch-check

添加来源分支检查
This commit is contained in:
Xingyu.Wang 2023-02-17 15:40:29 +08:00 committed by GitHub
commit cf89796fe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,8 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: ensure source branch is not "master"
run: '[ "${{ github.head_ref }}" != master ]'
- name: "checkout master branch & return to pull request branch"
run: CURRENT=$(echo ${{github.ref}} | sed "s|refs/|refs/remotes/|") && git checkout master && git checkout $CURRENT
- name: run check