GitHub
GITHUB-ACTIONS · Question #44
What does the 'needs' keyword do in a GitHub Actions workflow?
The correct answer is A. Specifies the dependencies of a job. It controls job execution order by specifying that one job depends on the successful completion of one or more other jobs. This allows jobs to run sequentially instead of in parallel (which is the default in GitHub Actions).
GitHub Actions - Workflow Syntax
Question
What does the 'needs' keyword do in a GitHub Actions workflow?
Options
- ASpecifies the dependencies of a job
- BSets up the environment
- CDefines environment variables
- DTriggers a job based on an event
How the community answered
(58 responses)- A86% (50)
- B7% (4)
- C2% (1)
- D5% (3)
Explanation
It controls job execution order by specifying that one job depends on the successful completion of one or more other jobs. This allows jobs to run sequentially instead of in parallel (which is the default in GitHub Actions).
Topics
#job dependencies#needs keyword#workflow syntax
Community Discussion
No community discussion yet for this question.