diff --git a/.github/workflows/ci-server.yaml b/.github/workflows/ci-server.yaml index 56c117f28..6e18ec4ef 100644 --- a/.github/workflows/ci-server.yaml +++ b/.github/workflows/ci-server.yaml @@ -8,15 +8,12 @@ jobs: server-test: runs-on: ubuntu-latest steps: - - run: echo "GITHUB_HEAD_REF: ${{ github.head_ref }}" - - run: echo "GITHUB_REF_NAME: ${{ github.ref_name }}" - - run: echo "GITHUB_REF: ${{ github.ref }}" - uses: actions/checkout@v3 - if: github.head_ref == 'main' + if: github.event_name != 'pull_request_target' with: ref: ${{ github.head_ref || github.ref_name }} - uses: actions/checkout@v3 - if: github.head_ref != 'main' + if: github.head_ref == 'pull_request_target' with: ref: "refs/pull/${{ github.event.number }}/merge" - name: Setup Node.js