From c93283ec5e04f3e124b81f66cde2e96673278142 Mon Sep 17 00:00:00 2001 From: hiento09 <136591877+hiento09@users.noreply.github.com> Date: Thu, 4 Apr 2024 19:25:36 +0700 Subject: [PATCH] Change condition for trigger PR from forked repo (#2611) Co-authored-by: Hien To --- .github/workflows/jan-electron-linter-and-test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/jan-electron-linter-and-test.yml b/.github/workflows/jan-electron-linter-and-test.yml index e39af3088..033b75c39 100644 --- a/.github/workflows/jan-electron-linter-and-test.yml +++ b/.github/workflows/jan-electron-linter-and-test.yml @@ -38,7 +38,7 @@ on: jobs: test-on-macos: - if : github.event_name != 'pull_request_target' + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository runs-on: [self-hosted, macOS, macos-desktop] steps: - name: Getting the repo @@ -66,7 +66,7 @@ jobs: TURBO_TOKEN: "${{ secrets.TURBO_TOKEN }}" test-on-macos-pr-target: - if : github.event_name == 'pull_request_target' + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository runs-on: [self-hosted, macOS, macos-desktop] steps: - name: Getting the repo @@ -124,7 +124,7 @@ jobs: TURBO_TEAM: "windows" TURBO_TOKEN: "${{ secrets.TURBO_TOKEN }}" test-on-windows-pr: - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository runs-on: windows-desktop-default-windows-security steps: - name: Getting the repo @@ -154,7 +154,7 @@ jobs: TURBO_TOKEN: "${{ secrets.TURBO_TOKEN }}" test-on-windows-pr-target: - if: github.event_name == 'pull_request_target' + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository runs-on: windows-desktop-default-windows-security steps: - name: Getting the repo @@ -182,7 +182,7 @@ jobs: test-on-ubuntu: runs-on: [self-hosted, Linux, ubuntu-desktop] - if: github.event_name != 'pull_request_target' + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository steps: - name: Getting the repo uses: actions/checkout@v3 @@ -211,7 +211,7 @@ jobs: test-on-ubuntu-pr-target: runs-on: [self-hosted, Linux, ubuntu-desktop] - if: github.event_name == 'pull_request_target' + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository steps: - name: Getting the repo uses: actions/checkout@v3