GH-200 practice question 13 of 15

When creating and managing custom actions in an enterprise setting, which of the following is considered a best practice?

Full set: 100 questions
Answer options
A: creating a separate repository for each action so that the version can be managed independently Correct answer
B: creating a separate branch in application repositories that only contains the actions
C: creating a single repository for all custom actions so that the versions for each action are all the same
D: including custom actions that other teams need to reference in the same repository as application code
Correct Answer:
A. creating a separate repository for each action so that the version can be managed independently
Explanation

For custom actions intended for reuse across an enterprise, the best practice is to create a separate, dedicated repository for each action. This approach decouples the action from any single application, promoting wider adoption and reusability. It allows each action to have its own versioning, release cycle, and access controls, treating it as an independent software component. This modularity simplifies maintenance and allows teams to consume specific, stable versions of the actions they need.

Why Incorrect

B. creating a separate branch...: This tightly couples the action to a specific application's repository, making it difficult to version and reuse independently.
C. creating a single repository for all...: This forces all actions to share the same versioning scheme, which is inflexible and complicates updates to individual actions.
D. including custom actions...in the same repository...: This is appropriate for local actions used by only one workflow, not for shared actions that other teams need to reference.

References

GitHub Docs

"About custom actions". In the section "Choosing a location for your action

" it describes the benefits of creating a dedicated repository for an action that you plan to share with others.

GitHub Docs

"Reusing workflows". While about workflows

the principle of storing reusable components in their own repositories for versioning and discovery is a core concept that also applies to actions.

Scroll to Top