Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/assign_default_environment_variables.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ Describe "assign_default_environment_variables" {
"GITHUB_REF_PROTECTED", "GITHUB_REF_TYPE", "GITHUB_REPOSITORY",
"GITHUB_REPOSITORY_OWNER", "GITHUB_RETENTION_DAYS", "GITHUB_RUN_ATTEMPT",
"GITHUB_RUN_ID", "GITHUB_RUN_NUMBER", "GITHUB_SERVER_URL", "GITHUB_SHA",
"GITHUB_STEP_SUMMARY", "GITHUB_WORKFLOW", "GITHUB_WORKSPACE", "RUNNER_ARCH",
"RUNNER_DEBUG", "RUNNER_NAME", "RUNNER_OS", "RUNNER_TEMP", "RUNNER_TOOL_CACHE"
"GITHUB_STEP_SUMMARY", "GITHUB_TOKEN", "GITHUB_WORKFLOW", "GITHUB_WORKSPACE",
"RUNNER_ARCH", "RUNNER_DEBUG", "RUNNER_NAME", "RUNNER_OS", "RUNNER_TEMP",
"RUNNER_TOOL_CACHE"
)

# Assert: Verify the output contains all default environment variables
Expand Down
5 changes: 3 additions & 2 deletions src/assign_default_environment_variables.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ $defaultGitHubEnvVars = @(
"GITHUB_REF_PROTECTED", "GITHUB_REF_TYPE", "GITHUB_REPOSITORY",
"GITHUB_REPOSITORY_OWNER", "GITHUB_RETENTION_DAYS", "GITHUB_RUN_ATTEMPT",
"GITHUB_RUN_ID", "GITHUB_RUN_NUMBER", "GITHUB_SERVER_URL", "GITHUB_SHA",
"GITHUB_STEP_SUMMARY", "GITHUB_WORKFLOW", "GITHUB_WORKSPACE", "RUNNER_ARCH",
"RUNNER_DEBUG", "RUNNER_NAME", "RUNNER_OS", "RUNNER_TEMP", "RUNNER_TOOL_CACHE"
"GITHUB_STEP_SUMMARY", "GITHUB_TOKEN", "GITHUB_WORKFLOW", "GITHUB_WORKSPACE",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GITHUB_TOKEN is a secret, I think we should not do this here.

"RUNNER_ARCH", "RUNNER_DEBUG", "RUNNER_NAME", "RUNNER_OS", "RUNNER_TEMP",
"RUNNER_TOOL_CACHE"
)

$defaultGitHubEnv = & $splitToArgs -argument_name "--env" -env_arrays $defaultGitHubEnvVars
Expand Down