diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 81ea4f0541..c81ec55cb6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,8 +35,10 @@ jobs: - false include: - noxenv: linkcheck - continue-on-error: >- # Don't block PRs on linkcheck unrelated failures - ${{ toJSON(github.event_name == 'pull_request') }} + # Don't block PRs, merge groups, or non-main pushes on unrelated linkcheck failures. + continue-on-error: >- + ${{ toJSON(contains(['merge_group', 'pull_request'], github.event_name) || + (github.event_name == 'push' && github.ref_name != github.event.repository.default_branch)) }} steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0