ci: fix skip condition for draft pull requests in CI workflows (#2088)

* ci: run xxx-result only when pre_job is run successfully
* fix get-result steps
This commit is contained in:
Luna Yao
2026-04-09 03:45:04 +02:00
committed by GitHub
parent 26b1794723
commit c5fbd29c0e
5 changed files with 22 additions and 28 deletions
+3 -3
View File
@@ -150,9 +150,9 @@ jobs:
test:
runs-on: ubuntu-latest
needs: [ pre_job, test_matrix ]
if: needs.pre_job.outputs.should_skip != 'true' && always()
needs: [ pre_job, check, test_matrix ]
if: needs.pre_job.result == 'success' && needs.pre_job.outputs.should_skip != 'true' && !cancelled()
steps:
- name: Mark result as failed
if: needs.test_matrix.result != 'success'
if: contains(needs.*.result, 'failure')
run: exit 1