diff --git a/.github/workflows/run-bitrise-e2e-check.yml b/.github/workflows/run-bitrise-e2e-check.yml index 5dd0ca3c20e..23340257179 100644 --- a/.github/workflows/run-bitrise-e2e-check.yml +++ b/.github/workflows/run-bitrise-e2e-check.yml @@ -12,9 +12,24 @@ env: WORKFLOW_NAME: 'run-bitrise-e2e-check' jobs: + is-fork-pull-request: + name: Determine pull request source + if: ${{ github.event.issue.pull_request || github.event_name == 'pull_request' }} + runs-on: ubuntu-latest + outputs: + IS_FORK: ${{ steps.is-fork.outputs.IS_FORK }} + steps: + - uses: actions/checkout@v3 + - name: Determine whether this PR is from a fork + id: is-fork + run: echo "IS_FORK=$(gh pr view --json isCrossRepository --jq '.isCrossRepository' "${{ github.event.number }}" )" >> "$GITHUB_OUTPUT" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run-bitrise-e2e-check: + needs: is-fork-pull-request runs-on: ubuntu-latest - if: ${{ github.event.issue.pull_request || github.event_name == 'pull_request' }} + if: ${{ needs.is-fork-pull-request.outputs.IS_FORK == 'false' }} permissions: pull-requests: write contents: write