github · GitHub Actions Docs
Actions Using conditions to control job execution - GitHub Docs
Teaches how to use the if conditional key to control whether specific jobs in a GitHub Actions workflow are executed based on expressions, context variables, or job outputs.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Actions Using conditions to control job execution - GitHub Docs
Teaches how to use the if conditional key to control whether specific jobs in a GitHub Actions workflow are executed based on expressions, context variables, or job outputs.
When To Use
Use when you need to skip or execute specific jobs based on branch names, event types, previous job statuses, or custom expression evaluations.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/actions-how-tos-write-workflows-using-conditions-to-control-job-executio-workflow-guide.md | A guide explaining how to use job-level conditions to control workflow execution in GitHub Actions. | Questions about a guide explaining how to use job-level conditions to control workflow execution in GitHub Actions. |
examples/actions-how-tos-write-workflows-using-conditions-to-control-job-executio.text | A GitHub Actions workflow YAML example demonstrating how to use the 'if' conditional to control job execution based on repository name. | Exact payloads, commands, or snippets shown in A GitHub Actions workflow YAML example demonstrating how to use the 'if' conditional to control job execution based o... |
What This Skill Covers
-
- GitHub Actions / - How-tos / - Write workflows / - Choose when workflows run / - Control jobs with conditions
- Main sections:
Example: Only run job for a specific repository.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-jobs-with-conditions
