diff --git a/README.md b/README.md index 5fe969e..9929f66 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,42 @@ The only required input is `project-name`. The location (in this repository) of the [buildspec file][codebuild buildspec] that CodeBuild requires. By default, the action uses the buildspec file location - that you configured in the CodeBuild project. + that you configured in the CodeBuild project. + + Alternatively, you can pass in an inline buildspec definition like so: + + ``` + - name: Run CodeBuild + uses: aws-actions/aws-codebuild-run-build@v1 + with: + project-name: my-codebuild-job + disable-source-override: true + buildspec-override: | + version: 0.2 + phases: + install: + runtime-versions: + nodejs: 16 + commands: + - npm install -g typescript + - npm install + pre_build: + commands: + - echo Installing source NPM dependencies... + build: + commands: + - echo Build started on `date` + - tsc + - npm prune --production + post_build: + commands: + - echo Build completed on `date` + artifacts: + type: zip + files: + - package.json + - package-lock.json + ``` 1. **compute-type-override** (optional) : The name of a compute type for this build that overrides the one specified in the build project. @@ -201,7 +236,7 @@ this will overwrite them. uses: aws-actions/aws-codebuild-run-build@v1 with: project-name: CodeBuildProjectName - buildspec-override: path/to/buildspec.yaml + buildspec-override: path/to/buildspec.yaml or inline buildspec definition compute-type-override: compute-type environment-type-override: environment-type image-override: ecr-image-uri