GITHUB-ACTIONS · Question #16
As a developer, what is the safest way to reference an action to prevent modification of the underlying code?
The correct answer is A. Use a commit hash.. Using a commit hash is the safest method because it references a specific point in time in the repository's history. This ensures that the action is locked to that exact version and will not be affected by any future changes or modifications to the codebase. Even if the action is
Question
As a developer, what is the safest way to reference an action to prevent modification of the underlying code?
Options
- AUse a commit hash.
- BUse a branch name.
- CUse a patch release tag.
- DUse a major release tag.
How the community answered
(40 responses)- A90% (36)
- B5% (2)
- C3% (1)
- D3% (1)
Explanation
Using a commit hash is the safest method because it references a specific point in time in the repository's history. This ensures that the action is locked to that exact version and will not be affected by any future changes or modifications to the codebase. Even if the action is updated later, your workflow will continue using the specific commit you referenced.
Topics
Community Discussion
No community discussion yet for this question.