From 206d8c1e38ce9702e2eb2bfa3c20c628f972a485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20M=C3=B6ller?= Date: Wed, 18 Dec 2024 11:09:20 +0100 Subject: [PATCH] chore: use the pull request head to run the integration tests (#1202) #### What this PR does / why we need it This will use the Pull Request Branch Reference and Repository to checkout OCM #### Which issue(s) this PR fixes --- .github/workflows/integration-test.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index 384748e96c..59082e36a0 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -16,6 +16,7 @@ permissions: jobs: test: + if: github.event_name == 'push' name: Run tests uses: open-component-model/ocm-integrationtest/.github/workflows/integrationtest.yaml@main permissions: @@ -24,4 +25,17 @@ jobs: packages: write secrets: inherit with: - ref: ${{ github.ref }} \ No newline at end of file + ref: ${{ github.ref }} + repo: ${{ github.repository }} + test-pr: + if: github.event_name == 'pull_request_target' + name: Run tests + uses: open-component-model/ocm-integrationtest/.github/workflows/integrationtest.yaml@main + permissions: + contents: write + id-token: write + packages: write + secrets: inherit + with: + ref: ${{ github.event.pull_request.head.ref }} + repo: ${{ github.event.pull_request.head.repo.name }} \ No newline at end of file