Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Actions · GitHub Actions

Direct answer

Actions are reusable steps in GitHub Actions workflows, referenced with uses: such as actions/checkout@v4. Pin third-party actions to a full commit SHA to protect against tampered tags.

When to use this

Use this when using reusable actions in GitHub Actions workflows.

First 30 seconds

1. Actions are reusable steps (marketplace or local).

2. Pin to commit SHAs.

3. Review third-party actions.

4. Dependabot updates.

5. Restrict allowed actions in org settings.

Operational verification

uses: action@sha → executes in job

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
GitHub Actions custom actions
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 custom actions · 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 using reusable actions in GitHub Actions workflows.
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

Validate metadata syntax and run the action in a fixture workflow with normal, missing/invalid and failure-inducing inputs. Confirm declared outputs are populated, exit codes map to step status, permissions are sufficient but not excessive, and no secret values leak. Pin the caller to a commit SHA during verification and compare produced artifacts or target state independently.

Step 2 Common mistakes Narrow the fault
  • Third-party actions referenced by tag instead of commit SHA.
Step 3 Where it fails Narrow the fault

Separate caller workflow syntax, revision resolution/download, runner environment, action runtime/dependencies, permissions/secrets, external APIs and final target state. “Action not found” differs from runtime failure, and a successful action step may still produce semantically wrong output. Do not switch to a mutable latest tag to fix a failure; verify the pinned implementation and target boundary first.

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
  • Pin to a full commit SHA.
  • Review third-party actions.
  • Prefer official actions.
Key checks
  • grep -rn 'uses:' .github/workflows — actions used
  • Pin to full commit SHA — supply chain
  • Dependabot for actions — updates
ReferenceWhy it matters1 section · depth on demand

In depth

Actions are reusable step packages — JavaScript, Docker or composite — referenced with uses: in a workflow, such as actions/checkout or actions/setup-python. They come from the Marketplace, other repositories or the same repository.

- uses: actions/setup-python@v5
  with: { python-version: '3.12' }
- uses: org/internal-actions/render@3f2a1c9d...   # pinned commit SHA
Security practiceReason
Pin to full commit SHATags can be moved by the owner
Prefer verified/official actionsLower supply-chain risk
Review what an action does with secretsIt runs with your token
Dependabot for action updatesStay patched
ReferenceImportant terms & boundaries1 section · depth on demand

Mechanics

A GitHub Action is a reusable execution unit referenced by workflow steps. Metadata declares inputs, outputs and runtime implementation, while the action code or composite steps execute on the runner. JavaScript, Docker and composite actions have different packaging/runtime boundaries. The caller controls permissions, environment, secrets and revision pinning; the action controls its implementation contract. Mutable tags can change behavior without changing the workflow file.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Lifecycle

Maintain the action repository like a versioned dependency: test releases, publish immutable tags/SHAs, update runtime dependencies and document breaking input/output changes. Keep default permissions minimal and avoid assuming secrets are always present. For JavaScript actions, bundle required code as prescribed by GitHub rather than depending on an undeclared install step. Deprecate old major versions explicitly.

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 custom actions current

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

Basis: https://docs.github.com/en/actions/concepts/workflows-and-actions/custom-actions · confidence 94%
Embedded reference data

Quick lookup tables

GitHub Actions → Actions · operational reference

Context-specific ownership, verification, output and failure-boundary lookup for GitHub Actions → Actions.

LayerGitHub Actions → Actions operational reference
Runtime/ownershipGitHub Actions custom actions · identify controller/parser, durable intent, identity and target ownership before mutation
Persistent intentVersioned definition/configuration with explicit dependencies, scope and credential boundary
VerificationInspect action.yml/action.yaml, pin the action revision, run a fixture workflow, validate inputs/outputs/exit code and inspect runner logs plus downstream result.
Expected interpretationThe action metadata matches the implementation, declared inputs/outputs are deterministic, failures set the expected status, and the calling workflow pins a reviewed revision.
Recovery boundaryPreserve correlation IDs + pre-state, repair first failing boundary, then verify the target independently
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

Capture workflow/run/job/step IDs, action repository and exact revision, runner OS, sanitized inputs, declared outputs, exit/status, log annotations and any external request/resource IDs. Distinguish the action’s step result from later job/workflow outcome. Preserve enough version identity to reproduce behavior after the action repository moves forward.

Confirmation

Confirm action

Continue?