GH-200 · Question #81
Which action type should be used to bundle a series of run steps into a reusable custom action?
The correct answer is A. Composite action. A composite action allows you to combine multiple workflow steps - including shell run steps, other actions, and environment setup - into a single reusable custom action defined in an action.yml file. The runs.using: 'composite' setting enables this pattern. This makes…
Question
Which action type should be used to bundle a series of run steps into a reusable custom action?
Options
- AComposite action
- BBash script action
- CDocker container action
- DJavaScript action
How the community answered
(47 responses)- A89% (42)
- B2% (1)
- C6% (3)
- D2% (1)
Explanation
A composite action allows you to combine multiple workflow steps - including shell run steps, other actions, and environment setup - into a single reusable custom action defined in an action.yml file. The runs.using: 'composite' setting enables this pattern. This makes composite actions the right choice when you want to package a series of run commands and steps without writing JavaScript or building a Docker container. Docker container actions and JavaScript actions require additional infrastructure, and 'Bash script action' is not a formal GitHub Actions type.
Topics
Community Discussion
No community discussion yet for this question.