GH-200 · Question #82
Which choices represent best practices for publishing actions so that they can be consumed reliably? (Each correct answer presents a complete solution. Choose two.)
The correct answer is B. commit SHA D. tag. When consuming or publishing GitHub Actions, reliability requires pinning to an immutable reference. A commit SHA (Option B, e.g., uses: actions/checkout@abc1234) is the most secure option - it cannot be changed, moved, or deleted, ensuring the exact code is always used. A versio
Question
Which choices represent best practices for publishing actions so that they can be consumed reliably? (Each correct answer presents a complete solution. Choose two.)
Options
- Adefault branch
- Bcommit SHA
- Crepo name
- Dtag
- Eorganization name
How the community answered
(43 responses)- A2% (1)
- B74% (32)
- C9% (4)
- E14% (6)
Explanation
When consuming or publishing GitHub Actions, reliability requires pinning to an immutable reference. A commit SHA (Option B, e.g., uses: actions/checkout@abc1234) is the most secure option - it cannot be changed, moved, or deleted, ensuring the exact code is always used. A version tag (Option D, e.g., uses: actions/checkout@v4) is a best practice for stable, human-readable pinning and follows semantic versioning. Option A (default branch) is mutable and changes with every commit, making it unreliable. Options C and E (repo name and organization name) are not valid reference types for actions pinning.
Topics
Community Discussion
No community discussion yet for this question.