GitHub Actions "This job depends on a job that was skipped"
When a needed job is skipped (its if was false), all jobs that depend on it skip too, unless they override their own if with a status function and check the upstream result.
What this error means
A job never runs and the UI notes it depends on a skipped job, even though nothing failed.
github-actions
Job 'package' was skipped because 'build' (a dependency) was skipped.Common causes
Conditional upstream job evaluated false
An upstream if that skips cascades the skip to dependents.
No override on the dependent job
Without a status-function if, the dependent inherits the skip.
How to fix it
Branch on the upstream result
- Add if: \${{ !cancelled() }} (or always()) on the dependent job.
- Then check needs.<job>.result to run only the intended path.
- Treat 'skipped' as a distinct result from 'success'/'failure'.
.github/workflows/ci.yml
package:
needs: build
if: ${{ !cancelled() && needs.build.result != 'failure' }}
runs-on: ubuntu-latest
steps:
- run: ./package.shHow to prevent it
- Make skip-propagation intentional with status functions where needed.
- Use needs.<job>.result to distinguish skipped from succeeded.
Frequently asked questions
What causes "depends on a skipped job"?
An upstream if that skips cascades the skip to dependents.
How do I fix depends on a skipped job?
Branch on the upstream result
Related guides
GitHub Actions "Job has been skipped" (needs) - Why & FixFix a GitHub Actions job that is skipped because a job in its needs was skipped or failed - downstream jobs s…
GitHub Actions if: always() still skipped when dependency is canceledFix a GitHub Actions step using if: always() that still skips - a canceled workflow short-circuits most steps…
GitHub Actions needs.<job>.outputs undefined when upstream skippedFix GitHub Actions where needs.<job>.outputs.* is empty - a skipped or failed upstream job produces no output…