File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1717 # /dev.Dockerfile
1818 GO_VERSION : 1.18
1919
20+ # If the action was triggered by a pull request, then the target branch of
21+ # the pull request is used as the base branch. However, if the action is a
22+ # push, then base_ref will be empty and the branch being pushed to should
23+ # instead be used as the base branch.
24+ BASE_BRANCH : ${{ github.base_ref || github.ref_name }}
25+
2026jobs :
2127 # #######################
2228 # frontend build checks
@@ -219,16 +225,16 @@ jobs:
219225 with :
220226 go-version : ' ${{ env.GO_VERSION }}'
221227
222- - name : fetch and rebase on ${{ github.base_ref }}
228+ - name : fetch and rebase on ${{ env.BASE_BRANCH }}
223229 run : |
224230 git remote add upstream https://github.com/${{ github.repository }}
225231 git fetch upstream
226232 export GIT_COMMITTER_EMAIL="[email protected] " 227233 export GIT_COMMITTER_NAME="LiT CI"
228- git rebase upstream/${{ github.base_ref }}
234+ git rebase upstream/${{ env.BASE_BRANCH }}
229235
230236 - name : check commits
231- run : scripts/check-each-commit.sh upstream/${{ github.base_ref }}
237+ run : scripts/check-each-commit.sh upstream/${{ env.BASE_BRANCH }}
232238
233239 # #######################
234240 # lint code
You can’t perform that action at this time.
0 commit comments