What is the difference between `run` and `uses` in a step?
BeginnerConceptWorkflow Anatomy & Execution Model
Answer
run executes a script in a shell on the runner (bash by default on Linux and macOS, pwsh on Windows). uses invokes an action: from a public repo (actions/checkout@v4), a local path (./.github/actions/setup), or a Docker image (docker://alpine:3.20). A step cannot have both. Inputs to an action go in with:; environment for either goes in env:.
More on Workflow Anatomy & Execution Model
Define workflow, run, job, step, action and runner in one line each.BeginnerWhat is the minimum valid workflow file?BeginnerWhere must workflow files live, and does the file extension matter?BeginnerWhich version of the workflow file does GitHub use for a given run?IntermediateWhat does a GitHub-hosted runner give you at the start of a job?BeginnerShould you use `ubuntu-latest` or `ubuntu-24.04`?Beginner