Skip to content

Commit aaefa8a

Browse files
authored
Refactor GitHub Actions workflow for pull requests
Updated the GitHub Actions workflow to use 'pull_request' instead of 'pull_request_target' and simplified the checkout steps.
1 parent 011117b commit aaefa8a

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

.github/workflows/codeception.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- "[0-9]+.[0-9]+"
1010
- "[0-9]+.x"
1111
- "feature-*"
12-
pull_request_target:
12+
pull_request:
1313
types: [opened, synchronize, reopened]
1414

1515
env:
@@ -24,17 +24,8 @@ jobs:
2424
matrix: ${{ steps.set-matrix.outputs.matrix }}
2525
private_repo: ${{ env.PRIVATE_REPO }}
2626
steps:
27-
- name: Checkout PR head (only for pull_request_target)
28-
if: github.event_name == 'pull_request_target'
29-
uses: "actions/checkout@v4"
30-
with:
31-
ref: "refs/pull/${{ github.event.pull_request.number }}/merge"
32-
33-
- name: Checkout PR head (for push or other events)
34-
if: github.event_name != 'pull_request_target'
35-
uses: "actions/checkout@v4"
36-
with:
37-
ref: ${{ github.ref }}
27+
- name: Checkout code
28+
uses: actions/checkout@v4
3829

3930
- name: Checkout reusable workflow repo
4031
uses: actions/checkout@v4

0 commit comments

Comments
 (0)