You need to perform a task that requires running a custom script in a GitHub Actions workflow. The script must run within the workflow environment without requiring an external container or prebuilt image.
The simplest correct choice is a run step. A run step executes shell commands or scripts directly on the runner inside the current workflow job environment. It does not require packaging a JavaScript action, building a Docker container, publishing an image, or creating reusable action metadata. A JavaScript action is appropriate when you are building a reusable Node.js-based action. A Docker container action is useful when the execution environment must be packaged with dependencies, but it adds container overhead. A composite action is useful for reusable sequences of steps, but the question asks only for running a custom script inside the workflow environment. GitHub workflow syntax shows run steps as the native way to execute commands inside a job.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit