Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/word-wrap-1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
taoyong-ty authored Sep 26, 2023
2 parents 05e9f3d + a70135f commit 6e322ef
Show file tree
Hide file tree
Showing 7 changed files with 2,436 additions and 3,587 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ The only required input is `project-name`.
1. **hide-cloudwatch-logs** (optional) :
Set to `true` if you do not want CloudWatch Logs to be streamed to GitHub Action.

1. **disable-github-env-vars** (optional) :
Set to `true` if you want do disable github environment variables in codebuild.

### Outputs

1. **aws-build-id** : The CodeBuild build ID of the build that the action ran.
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ inputs:
hide-cloudwatch-logs:
description: 'Set to `true` to prevent the CloudWatch logs from streaming the output to GitHub'
required: false
disable-github-env-vars:
description: 'Set to `true` if you want do disable github environment variables in codebuild'
required: false
outputs:
aws-build-id:
description: 'The AWS CodeBuild Build ID for this build.'
Expand Down
9 changes: 8 additions & 1 deletion code-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ function githubInputs() {
const hideCloudWatchLogs =
core.getInput("hide-cloudwatch-logs", { required: false }) === "true";

const disableGithubEnvVars =
core.getInput("disable-github-env-vars", { required: false }) === "true";

return {
projectName,
owner,
Expand All @@ -227,6 +230,7 @@ function githubInputs() {
updateBackOff,
disableSourceOverride,
hideCloudWatchLogs,
disableGithubEnvVars,
};
}

Expand All @@ -242,6 +246,7 @@ function inputs2Parameters(inputs) {
imageOverride,
envPassthrough = [],
disableSourceOverride,
disableGithubEnvVars,
} = inputs;

const sourceOverride = !disableSourceOverride
Expand All @@ -254,7 +259,9 @@ function inputs2Parameters(inputs) {

const environmentVariablesOverride = Object.entries(process.env)
.filter(
([key]) => key.startsWith("GITHUB_") || envPassthrough.includes(key)
([key]) =>
(!disableGithubEnvVars && key.startsWith("GITHUB_")) ||
envPassthrough.includes(key)
)
.map(([name, value]) => ({ name, value, type: "PLAINTEXT" }));

Expand Down
Loading

0 comments on commit 6e322ef

Please sign in to comment.