From 875b94a226c13943650d8e90bc1cbeef5c508ef0 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Mon, 27 May 2024 11:21:48 +0400 Subject: [PATCH 1/3] Fail explicitly with pull requests opened from forks --- .github/workflows/validate-pr.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-pr.yml b/.github/workflows/validate-pr.yml index 0c3de04765..a31db20252 100644 --- a/.github/workflows/validate-pr.yml +++ b/.github/workflows/validate-pr.yml @@ -15,10 +15,13 @@ on: jobs: validate-pr: name: build - if: github.repository_owner == 'elastic' # this action will fail if executed from a fork runs-on: ubuntu-latest steps: + - name: Check pull request was opened from branch + if: ${{ github.event.pull_request.head.repo.full_name != 'elastic/elasticsearch-specification' }} + run: echo "Validation is not supported from forks"; exit 1 + - uses: actions/checkout@v4 with: path: ./elasticsearch-specification From 52fd4cbd148f53a1be876540b51d48618d20f0b3 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Mon, 27 May 2024 15:50:55 +0400 Subject: [PATCH 2/3] Remove template syntax --- .github/workflows/validate-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-pr.yml b/.github/workflows/validate-pr.yml index a31db20252..0b388ddc72 100644 --- a/.github/workflows/validate-pr.yml +++ b/.github/workflows/validate-pr.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Check pull request was opened from branch - if: ${{ github.event.pull_request.head.repo.full_name != 'elastic/elasticsearch-specification' }} + if: github.event.pull_request.head.repo.full_name != 'elastic/elasticsearch-specification' run: echo "Validation is not supported from forks"; exit 1 - uses: actions/checkout@v4 From 18d7870b78672199c63be413eaee61ae9552958c Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Mon, 27 May 2024 15:51:32 +0400 Subject: [PATCH 3/3] Trigger build --- specification/trigger-build | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 specification/trigger-build diff --git a/specification/trigger-build b/specification/trigger-build new file mode 100644 index 0000000000..e69de29bb2