Skip to content

Commit

Permalink
Change condition for trigger PR from forked repo (janhq#2611)
Browse files Browse the repository at this point in the history
Co-authored-by: Hien To <[email protected]>
  • Loading branch information
hiento09 and hiento09 authored Apr 4, 2024
1 parent 8ede9eb commit c93283e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/jan-electron-linter-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c93283e

Please sign in to comment.