@@ -21,7 +21,42 @@ The only required input is `project-name`.
2121 The location (in this repository) of the [ buildspec file] [ codebuild buildspec ]
2222 that CodeBuild requires.
2323 By default, the action uses the buildspec file location
24- that you configured in the CodeBuild project.
24+ that you configured in the CodeBuild project.
25+
26+ Alternatively, you can pass in an inline buildspec definition like so:
27+
28+ ```
29+ - name: Run CodeBuild
30+ uses: aws-actions/aws-codebuild-run-build@v1
31+ with:
32+ project-name: my-codebuild-job
33+ disable-source-override: true
34+ buildspec-override: |
35+ version: 0.2
36+ phases:
37+ install:
38+ runtime-versions:
39+ nodejs: 16
40+ commands:
41+ - npm install -g typescript
42+ - npm install
43+ pre_build:
44+ commands:
45+ - echo Installing source NPM dependencies...
46+ build:
47+ commands:
48+ - echo Build started on `date`
49+ - tsc
50+ - npm prune --production
51+ post_build:
52+ commands:
53+ - echo Build completed on `date`
54+ artifacts:
55+ type: zip
56+ files:
57+ - package.json
58+ - package-lock.json
59+ ```
25601 . ** compute-type-override** (optional) :
2661 The name of a compute type for this build that overrides the one specified
2762 in the build project.
@@ -201,7 +236,7 @@ this will overwrite them.
201236 uses: aws-actions/aws-codebuild-run-build@v1
202237 with:
203238 project-name: CodeBuildProjectName
204- buildspec-override: path/to/buildspec.yaml
239+ buildspec-override: path/to/buildspec.yaml or inline buildspec definition
205240 compute-type-override: compute-type
206241 environment-type-override: environment-type
207242 image-override: ecr-image-uri
0 commit comments