Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Steps · GitHub Actions

Direct answer

Steps are the individual commands or actions in a job, run in order with run: for shell commands or uses: for actions, sharing the workspace and environment.

When to use this

Use this when writing the individual steps of a job.

First 30 seconds

1. Steps run commands or actions.

2. Name steps.

3. Bash default uses -e; be explicit.

4. Avoid injecting untrusted input into run scripts (use env vars).

5. Use outputs via $GITHUB_OUTPUT.

Operational verification

step → command/action → output

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
GitHub Actions workflow automation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformGitHub Actions workflow automation · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when writing the individual steps of a job.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

Record repository, commit/ref, workflow, run/attempt, job, step and runner labels/ID; inspect the runtime/control-plane result; then query the workflow outputs/artifacts and any repository/cloud/infrastructure state mutated by the run through an independent read path and compare it with the versioned intent. The negative fixture should deliberately exercise risks such as event filter surprises, unpinned actions, secret/permission overreach, runner drift, matrix partial failure, artifact confusion and assuming conclusion=success shows external convergence, choosing the cases most relevant to step action/shell/uses identity, inputs/env, condition, outputs and conclusion, plus correlation to the external side effect made by the step. For GitHub Actions → Steps, the evidence must connect the control-plane result to the workflow outputs/artifacts and any repository/cloud/infrastructure state mutated by the run and explain any gap between desired, controller-reported and consumer-visible state.

Step 2 Common mistakes Narrow the fault
  • Steps relying on previous step output without id and outputs.
Step 3 Where it fails Narrow the fault

Failure analysis for GitHub Actions → Steps should follow the path through the components: event/dispatch → workflow resolution → job scheduling → runner → step/action → artifact or external mutation → API/target read-back. Common failure classes include event filter surprises, unpinned actions, secret/permission overreach, runner drift, matrix partial failure, artifact confusion and assuming conclusion=success shows external convergence. Before retrying a mutating operation, read current target state using the stable identity repository, commit/ref, workflow, run/attempt, job, step and runner labels/ID; if state is unknown, stop broad retries.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Steps use run: for shell or uses: for actions.
  • Steps share the job workspace.
  • if: makes steps conditional.
Key checks
  • gh run view <run-id> --log — step logs
  • Step names — readability
  • set -euo pipefail in run steps — failure handling
ReferenceWhy it matters1 section · depth on demand

In depth

Steps are the individual commands or actions within a GitHub Actions job, run in sequence on the same runner. A step either uses: an action or run:s a shell command.

steps:
  - uses: actions/checkout@v4
  - name: Render configs
    id: render
    run: python render.py --out build/ && echo "count=$(ls build | wc -l)" >> "$GITHUB_OUTPUT"
  - name: Show count
    run: echo "rendered ${{ steps.render.outputs.count }} configs"

Steps fail the job on a non-zero exit code; use continue-on-error: true only for genuinely optional steps.

ReferenceImportant terms & boundaries1 section · depth on demand

Mechanics

GitHub Actions → Steps is owned at runtime by the GitHub Actions workflow scheduler plus GitHub-hosted or self-hosted runner executing each job. Its durable intent is versioned workflow YAML, actions/reusable-workflow refs, permissions, secrets and environment gates; the stable identity contract is repository, commit/ref, workflow, run/attempt, job, step and runner labels/ID. The consumer-visible target is the workflow outputs/artifacts and any repository/cloud/infrastructure state mutated by the run. The operating invariants are that trigger and permissions are explicit, third-party actions are pinned appropriately, runner context is known, outputs/artifacts are associated with one run, and external changes are independently verified. Follow the chain of components event/dispatch → workflow resolution → job scheduling → runner → step/action → artifact or external mutation → API/target read-back and record which layer currently owns truth. The linked authority for bounded mechanics is GitHub Docs — Workflow syntax; documentation support is separate from observed lab/production Evidence.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docGitHub Actions workflow automation current

Authoritative/upstream documentation reviewed for bounded claims in GitHub Actions > Steps. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax · confidence 94%
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

Capture at minimum repo/ref/SHA, workflow/run/attempt, job/step, runner, permissions, action ref, exit/conclusion, output/artifact IDs and external target IDs.

Confirmation

Confirm action

Continue?