StepIdNaming¶
Step should have a lower-case kebab ID.
Defined by IdNamingRule which supports workflows, actions in the "Default" ruleset along with WorkflowIdNaming, JobIdNaming.
Description¶
A unique identifier for the step. --
steps[*].iddocumentation
The documentation doesn't define what's a valid ID, let alone a recommended one. Conventionally it's best to use lower-kebab-case naming for step names. This makes them consistent in style with the rest of the workflow syntax and workflow/job names.
Step IDs appear
- GitHub Expressions, as property dereferences of the
stepscontext,
e.g.${{ steps.some-step }} - in
ifconditions on other steps,
e.g.if: ${{ steps.some-step.outputs.some-output == 'something' }}. - in
outputsdeclarations of jobs,
e.g.some-output: ${{ steps.some-step.outputs.some-output }}.
Compliant example¶
Not having an id is the best case, use name: to express what the step is to the reader.
example.ymlon: push jobs: example: runs-on: ubuntu-latest steps: - name: "Example" run: echo "Example"
Non-compliant example¶
Step has non-lower-kebab-case ID.
example.ymlon: push jobs: example: runs-on: ubuntu-latest steps: - id: example step_NAME run: echo "Example"
- Line 6: Step[example step_NAME] in Job[example] should have a lower-case kebab ID.