GH-200 practice question 1 of 15
Which action type should be used to bundle a series of run steps into a reusable custom action?
Full set: 100 questionsA composite action allows you to combine multiple workflow steps, including run commands and uses of other actions, within a single action file. This is the designated method for bundling a sequence of shell commands and other actions into a reusable component that can be called as a single step in other workflows. This simplifies workflow files and promotes the "Don't Repeat Yourself" (DRY) principle by abstracting common sequences of tasks into a manageable, versionable unit.
B. A Bash script is a set of commands, but it is not a formal GitHub Actions "type" for bundling multiple distinct workflow steps into a reusable action.
C. A Docker container action is used to package the action's code and its environment, ensuring consistency, not for combining multiple run steps.
D. A JavaScript action executes code using a Node.js runtime. It is defined by a single main script file, not a sequence of run steps.
1. GitHub Docs. (2024). Creating a composite action. Introduction section. Retrieved from https://docs.github.com/en/actions/creating-actions/creating-a-composite-action. The document states, "A composite action allows you to combine multiple workflow steps within one action."
Keep practicing
Take the free GH-200 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other GH-200 practice questions
- Question 2As a developer, which workflow steps should you perform to publish an image to the GitHub…
- Question 3Where should workflow files be stored to be triggered by events in a repository?
- Question 5Which default environment variable specifies the branch or tag that triggered a workflow?
- Question 6As a developer, what is the safest way to reference an action to prevent modification of …
- Question 7Without the need to use additional infrastructure, what is the simplest and most maintain…
- Question 8Disabling a workflow allows you to stop a workflow from being triggered without having to…
