debugyamlgithub-actionsModeratepending
Debug: GitHub Actions workflow not triggering
Viewed 0 times
github-actionstriggerworkflowbranchespathsnot-running
Error Messages
Problem
GitHub Actions workflow doesn't run when expected. Push or PR events don't trigger the workflow.
Solution
Common causes and fixes:
on:
push:
branches: [main] # Only triggers on main, not feature/*
Fix: Add your branch pattern or use '**' for all
Workflow must be in .github/workflows/*.yml
NOT .github/workflow/ (missing 's')
# Validate locally:
# yamllint .github/workflows/ci.yml
# Or check Actions tab for parsing errors
on:
push:
paths: ['src/**'] # Won't trigger for README changes
# Workflows from forks need approval for first-time contributors
# Check: Settings > Actions > Fork pull request workflows
# Check: Actions tab > select workflow > Enable workflow
# Tags need separate trigger:
on:
push:
tags: ['v*']
gh run list --workflow=ci.yml
gh run view <run-id> --log-failed
- Wrong branch filter:
on:
push:
branches: [main] # Only triggers on main, not feature/*
Fix: Add your branch pattern or use '**' for all
- Wrong file path:
Workflow must be in .github/workflows/*.yml
NOT .github/workflow/ (missing 's')
- YAML syntax error:
# Validate locally:
# yamllint .github/workflows/ci.yml
# Or check Actions tab for parsing errors
- paths filter too restrictive:
on:
push:
paths: ['src/**'] # Won't trigger for README changes
- Forked repo restrictions:
# Workflows from forks need approval for first-time contributors
# Check: Settings > Actions > Fork pull request workflows
- Workflow disabled:
# Check: Actions tab > select workflow > Enable workflow
- push to tag but on:push:branches configured:
# Tags need separate trigger:
on:
push:
tags: ['v*']
- Check recent runs:
gh run list --workflow=ci.yml
gh run view <run-id> --log-failed
Revisions (0)
No revisions yet.