diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5ca315d99874..56378328e57e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ on: push: branches: - dev - pull_request: + pull_request_target: workflow_dispatch: concurrency: @@ -25,6 +25,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Bun @@ -76,6 +77,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Bun diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index b247d24b40db..06ca95b1f463 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -3,7 +3,7 @@ name: typecheck on: push: branches: [dev] - pull_request: + pull_request_target: branches: [dev] workflow_dispatch: @@ -13,6 +13,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Setup Bun uses: ./.github/actions/setup-bun