GitHub Action runner buildspec reference - Amazon CodeBuild
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

GitHub Action runner buildspec reference

This topic contains the buildspec reference for GitHub Action runner properties.


Optional sequence. Steps are used to run commands and actions in CodeBuild. For more information, see GitHub Action runner in Amazon CodeBuild.


Each build phase supports either a list of commands or a list of steps, but both cannot be used in the same phase.

Each build step contains the following properties.


Optional. The identifier for the step that can be used to reference the step in other contexts.


Optional. A conditional statement that can be used to prevent a step from running unless a condition is met. This statement can use any supported context, such as referencing environmental variables from CodeBuild, as well as expression.


Optional. The name for the step. If the name isn't specified, the name will default to the text specified in the run command.


The action that runs for the step. Some actions require you to set inputs using with. Reference the action's README to determine which inputs are required. For more information, see Which GitHub Actions can I use?.

If uses is specified in your build phase, it can't be used with run.


It's recommended that you include the version of the action you are using. This can be done by specifying a Git ref, SHA, or Docker tag. For more information, see steps.uses syntax.


A command that runs command-line programs. These can be single-line commands or multi-line commands. By default, these commands run using non-login shells. To choose a different shell, use shell.

If run is specified in your build phase, it can't be used with uses.


Optional. The shell specified for this sequence. For supported shell parameters, see If unspecified, the shell used is bash. If bash is unavailable, sh is used.


Optional. A map of input parameters defined by the action. Each parameter is a key/value pair.


Optional. A string that defines inputs for a Docker container.


Optional. The Docker entrypoint specified for the Dockerfile.


Optional. The variables specified for steps to use in the environment.


Optional. A Boolean value that indicates if a failure of this step sequence can be ignored.


The default value. If this step sequence fails, the build will fail.


If this step sequence fails, the build can still succeed.


Optional. The maximum number of minutes the step can run for before terminating. By default, there is no timeout. If the step timeout exceeds the build timeout, the step will stop when the build timeout is reached.

The following is an example using the Super-Linter GitHub Action:

version: 0.2 phases: build: steps: - name: Lint Code Base uses: github/super-linter@v5 env: VALIDATE_ALL_CODEBASE: true USE_FIND_ALGORITHM: true FILTER_REGEX_INCLUDE: '/github/workspace/buildspec.yml'