diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 36e9acfc2b..d57ef322a8 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,6 +1,6 @@ name: E2E test on: - pull_request: + pull_request_target: branches: - main paths-ignore: @@ -56,7 +56,8 @@ jobs: - name: Checkout repo uses: actions/checkout@v2 with: - fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 2 - name: Use Node ${{ matrix.node }} uses: actions/setup-node@v2 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 056c9d63e2..e89e712f52 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,6 @@ name: Lint on: - pull_request: + pull_request_target: branches: - main jobs: @@ -15,7 +15,8 @@ jobs: - name: Checkout repo uses: actions/checkout@v2 with: - fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 2 - name: Use Node.js 14.x uses: actions/setup-node@v2