File tree Expand file tree Collapse file tree 4 files changed +30801
-50728
lines changed Expand file tree Collapse file tree 4 files changed +30801
-50728
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ The only required input is `project-name`.
72721 . ** disable-source-override** (optional) :
7373 Set to ` true ` if you want to disable providing ` sourceVersion ` ,
7474 ` sourceTypeOverride ` and ` sourceLocationOverride ` to CodeBuild.
75+ 1 . ** source-version-override** (optional) :
76+ The source version that overrides the ` sourceVersion ` provided to Codebuild.
75771 . ** env-vars-for-codebuild** (optional) :
7678 A comma-separated list of the names of environment variables
7779 that the action passes from GitHub Actions to CodeBuild.
Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ inputs:
3434 disable-source-override :
3535 description : ' Set to `true` if you want do disable source repo override'
3636 required : false
37+ source-version-override :
38+ description : ' The source version that overrides the sourceVersion provided to Codebuild.'
39+ required : false
3740 hide-cloudwatch-logs :
3841 description : ' Set to `true` to prevent the CloudWatch logs from streaming the output to GitHub'
3942 required : false
Original file line number Diff line number Diff line change @@ -176,9 +176,10 @@ function githubInputs() {
176176 // the GITHUB_SHA value is NOT the correct value.
177177 // See: https://github.com/aws-actions/aws-codebuild-run-build/issues/36
178178 const sourceVersion =
179- process . env [ `GITHUB_EVENT_NAME` ] === "pull_request"
179+ core . getInput ( "source-version-override" , { required : false } ) ||
180+ ( process . env [ `GITHUB_EVENT_NAME` ] === "pull_request"
180181 ? ( ( ( payload || { } ) . pull_request || { } ) . head || { } ) . sha
181- : process . env [ `GITHUB_SHA` ] ;
182+ : process . env [ `GITHUB_SHA` ] ) ;
182183
183184 assert ( sourceVersion , "No source version could be evaluated." ) ;
184185 const buildspecOverride =
You can’t perform that action at this time.
0 commit comments