Skip to content
Latchkey

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

  1. Add if: \${{ !cancelled() }} (or always()) on the dependent job.
  2. Then check needs.<job>.result to run only the intended path.
  3. 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.sh

How 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

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card