From 5ba2a411b0fd21838c7194607b1a0da2382133be Mon Sep 17 00:00:00 2001 From: Rafik Kefi Date: Mon, 12 Aug 2024 12:01:11 -0400 Subject: [PATCH] add support for PRs from forks --- .github/workflows/e2e_testing.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e_testing.yaml b/.github/workflows/e2e_testing.yaml index 3019dd61..49eade70 100644 --- a/.github/workflows/e2e_testing.yaml +++ b/.github/workflows/e2e_testing.yaml @@ -20,7 +20,9 @@ jobs: - name: Checkout extension uses: actions/checkout@v4 with: - ref: ${{ github.head_ref }} + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }} + repository: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }} + token: ${{ secrets.GITHUB_TOKEN }} fetch-depth: 0 - name: Create .npmrc run: echo '//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}' >> .npmrc