File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -105,22 +105,23 @@ jobs:
105
105
runs-on : ubuntu-latest
106
106
steps :
107
107
- name : Check if fork
108
+ if : github.event_name == 'pull_request'
108
109
run : |
109
110
if [[ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" && "${{ matrix.type }}" == "enterprise" ]]; then
110
111
echo "IS_FORK=true" >> $GITHUB_ENV
111
112
else
112
113
echo "IS_FORK=false" >> $GITHUB_ENV
113
114
fi
114
115
- name : Comment PR in forks
115
- if : env.IS_FORK == 'true'
116
+ if : github.event_name == 'pull_request' && env.IS_FORK == 'true'
116
117
uses : peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
117
118
with :
118
119
token : ${{ secrets.GITHUB_TOKEN }}
119
120
issue-number : ${{ github.event.pull_request.number }}
120
121
body : |
121
122
⚠️ Enterprise tests skipped for fork PRs.
122
123
- name : Skip job if fork
123
- if : env.IS_FORK == 'true'
124
+ if : github.event_name == 'pull_request' && env.IS_FORK == 'true'
124
125
run : |
125
126
echo "Skipping job because PR is from a fork"
126
127
exit 0
You can’t perform that action at this time.
0 commit comments