ci: prevent dependent jobs from hanging when their gate is skipped #44

Merged
jmiller merged 1 commits from fix/dependent-jobs-no-hang into main 2026-07-04 19:40:27 +00:00
2 changed files with 6 additions and 2 deletions
+3 -2
View File
@@ -132,8 +132,9 @@ jobs:
name: Tests
runs-on: ubuntu-latest
needs: lint
# Skip on template repos (Template-*) — see lint job.
if: ${{ !startsWith(github.event.repository.name, 'Template-') }}
# Run only when lint succeeded; always() forces evaluation so a skipped
# lint (e.g. template repos) skips this job cleanly instead of hanging.
if: ${{ always() && needs.lint.result == 'success' }}
steps:
- name: Checkout
+3
View File
@@ -494,6 +494,9 @@ jobs:
name: Build RC Package
runs-on: ubuntu-latest
needs: [branch-policy, validate]
# Run only when both gates succeeded; always() forces evaluation so a skipped
# validate (e.g. template repos) skips this job cleanly instead of hanging.
if: ${{ always() && needs.branch-policy.result == 'success' && needs.validate.result == 'success' }}
steps:
- name: Trigger RC pre-release