{
  "id": 20159443,
  "title": "GitHub Actions step cannot have both uses and run, and what you get",
  "url": "https://urgent.news/2026/11/15/github-actions-step-cannot-have-both-uses-and-run-and-what-you-get",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-15T10:42:29.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/kalemi/github-actions-step-cannot-have-both-uses-and-run-and-what-you-get-2fmp"
  },
  "original_language": "en",
  "account": "A GitHub Actions step cannot contain both `uses` and `run` keys at the same time. If you try to include both, you will encounter an error that tells you which key is unexpected. The error message narrows down as you read it, starting with which key is chosen and which one has nowhere to go.\n\nThe error message also includes the line number, column number, and the name of the unexpected key. This information helps you identify the exact location of the issue in your workflow file. The key that appears first in your file will win, and the second key will be rejected because there are no loose keys to absorb it.\n\nTo fix the error, you need to split your step into two separate steps, each with its own `uses` or `run` key. If you intended to run an action followed by a command, create two distinct steps instead of trying to combine them into one. This will ensure that the workflow runs successfully and produces valid annotations in your commit.",
  "summary": "A GitHub Actions step cannot have both uses and run, and that sentence was once the message you got, but the parser that ships today does not contain it anywhere. What it produces instead names one of the two keys as unexpected, which is a different sentence and a more precise one once you know how the reader arrives at it. The reader narrows as it reads. The first of the two keys chooses a…",
  "key_points": [
    "GitHub Actions step cannot have both uses and run keys simultaneously.",
    "Error message identifies unexpected key and its location in workflow file.",
    "Split step into two separate steps with either uses or run key for successful workflow execution."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}