Skip to content

Commit 2019a8a

Browse files
authored
Fail explicitly with pull requests opened from forks (#2580)
1 parent 002ac3f commit 2019a8a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/validate-pr.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ on:
1515
jobs:
1616
validate-pr:
1717
name: build
18-
if: github.repository_owner == 'elastic' # this action will fail if executed from a fork
1918
runs-on: ubuntu-latest
2019

2120
steps:
21+
- name: Check pull request was opened from branch
22+
if: github.event.pull_request.head.repo.full_name != 'elastic/elasticsearch-specification'
23+
run: echo "Validation is not supported from forks"; exit 1
24+
2225
- uses: actions/checkout@v4
2326
with:
2427
path: ./elasticsearch-specification

0 commit comments

Comments
 (0)