nerdexam
GitHub

GITHUB-ACTIONS · Question #2

Which choices represent best practices for publishing actions so that they can be consumed reliably? (Choose two.)

The correct answer is B. tag C. commit SHA. Using a tag is a best practice because tags are immutable and represent a fixed version of your action. By referencing tags, consumers of your action can be assured they are using a stable and specific version of the action, which helps in avoiding issues with breaking changes…

Author and maintain actions

Question

Which choices represent best practices for publishing actions so that they can be consumed reliably? (Choose two.)

Options

  • Arepo name
  • Btag
  • Ccommit SHA
  • Dorganization name
  • Edefault branch

How the community answered

(41 responses)
  • A
    10% (4)
  • B
    85% (35)
  • D
    2% (1)
  • E
    2% (1)

Explanation

Using a tag is a best practice because tags are immutable and represent a fixed version of your action. By referencing tags, consumers of your action can be assured they are using a stable and specific version of the action, which helps in avoiding issues with breaking changes. The commit SHA is another reliable way to specify a particular version of an action. By referencing a specific commit SHA, consumers can ensure they are using exactly the code that was written at that moment, avoiding the potential for changes in the future.

Topics

#action publishing#version pinning#commit SHA#release tags

Community Discussion

No community discussion yet for this question.

Full GITHUB-ACTIONS Practice