diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f3355ac7f12..2ef1e40815c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -68,8 +68,9 @@ jobs: - name: Run build and test run: | - env yarn all + env: + GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }} - name: Verify Changed files uses: tj-actions/verify-changed-files@v20 diff --git a/src/__tests__/utils.test.ts b/src/__tests__/utils.test.ts index 59b4e0223ca..ddda5ee6c52 100644 --- a/src/__tests__/utils.test.ts +++ b/src/__tests__/utils.test.ts @@ -660,7 +660,7 @@ describe('utils test', () => { }) describe('getPreviousGitTag', () => { // Check if the environment variable GITHUB_REPOSITORY_OWNER is 'tj-actions' - const shouldSkip = process.env.GITHUB_REPOSITORY_OWNER !== 'tj-actions' + const shouldSkip = !!process.env.GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FORK // Function returns the second-latest tag and its SHA it('should return the second latest tag and its SHA when multiple tags are present', async () => { if (shouldSkip) {