Skip to content

Commit 70b0a3d

Browse files
oleg-jukovecDifferentialOrange
authored andcommitted
ci: use merge commit for pull_request_target
It would be more correct to use a merge request commit instead of original commit for pull_request_target.
1 parent 4975e39 commit 70b0a3d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Diff for: .github/workflows/testing.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,16 @@ jobs:
114114

115115
steps:
116116
- name: Clone the connector
117+
# `ref` as merge request is needed for pull_request_target because this
118+
# target runs in the context of the base commit of the pull request.
117119
uses: actions/checkout@v2
118-
# This is needed for pull_request_target because this event runs in the
119-
# context of the base commit of the pull request. It works fine for
120-
# `push` and `workflow_dispatch` because the default behavior is used
121-
# if `ref` and `repository` are empty.
120+
if: github.event_name == 'pull_request_target'
122121
with:
123-
ref: ${{github.event.pull_request.head.ref}}
124-
repository: ${{github.event.pull_request.head.repo.full_name}}
122+
ref: refs/pull/${{ github.event.pull_request.number }}/merge
123+
124+
- name: Clone the connector
125+
if: github.event_name != 'pull_request_target'
126+
uses: actions/checkout@v2
125127

126128
- name: Install tarantool ${{ matrix.tarantool }}
127129
run: |

0 commit comments

Comments
 (0)