diff --git a/.github/workflows/ci-server.yaml b/.github/workflows/ci-server.yaml index bfc8aa671..be88ed7da 100644 --- a/.github/workflows/ci-server.yaml +++ b/.github/workflows/ci-server.yaml @@ -9,8 +9,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + if: github.head_ref == 'main' with: ref: ${{ github.head_ref || github.ref_name }} + - uses: actions/checkout@v3 + if: github.head_ref != 'main' + with: + ref: "refs/pull/${{ github.event.number }}/merge" - name: Setup Node.js uses: actions/setup-node@v3 with: