action (GitHub Actions)
A reusable, published unit of automation that a workflow step calls with uses.
A compromised or moved action tag runs arbitrary code with your job's secrets and token.
In more detail
Actions come in three kinds: JavaScript actions, container actions and composite actions, and the caller uses all three the same way. A third-party action runs inside your job with your environment and token in reach, so pin it to a commit SHA and review it like a dependency.
Related terms
- uses — The workflow key that pulls a published action into a step by name, followed by an @ and a version.
- JavaScript action — An action written in JavaScript that the runner executes directly with Node.js, making it the fastest kind to start.
- container action — An action packaged as a container image or Dockerfile, so it can be written in any language but must start a container first.
- composite action — An action that bundles several workflow steps under one name, with no program of its own.
- pinning — Fixing an exact version or digest of something you depend on so it cannot change without you noticing.
Taught in
- Workflows, Jobs, Steps, and Actions — Continuous Integration & Continuous Delivery Pipelines
- Securing Pipelines: Secrets Management — Continuous Integration & Continuous Delivery Pipelines
- Distributing And Versioning Actions: Tags, SHAs And Marketplace — GitHub Actions (GH-200) Exam Prep
- Supply Chain: Pinning, Trusted Actions And Attestations — GitHub Actions (GH-200) Exam Prep