Skip to content
Discussion options

You must be logged in to vote

What's the difference between jobs.<job_id>.steps[].uses and jobs.<job_id>.steps[].run? When should you use one over the other?

These are both keys used in a GitHub Actions workflow file, inside a job's steps array.

jobs.<job_id>.steps[].uses
This references an external action — a pre-built unit of work published to the GitHub Marketplace, a public repository, or a Docker image. You point to it like:

yaml

  • uses: actions/checkout@v4
  • uses: docker://alpine:latest
    GitHub downloads and executes that action's code. You use uses when someone else has already written the logic (checking out code, setting up a language runtime, deploying to AWS, etc.) and you just want to call it with some inputs.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sudoUgando
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants