Skip to content

Prefer environment variables to interpolation in GitHub actions #5011

@iskiselev

Description

@iskiselev

Per @martincostello in #5002:

Use environment variables such as ${env:GITHUB_ACTION_PATH} is preferable to interpolation as it removes any possibility of shell injection and makes it easier to copy-paste snippets to terminals for testing.
Same here with interpolation. Either assign them to env vars and use those, or maybe they'll be available already as ${env:INPUT_NAME} like ${env:INPUT_ENVIRONMENT-TYPE} (I can't remember if that's a thing or not).
${{ and }} isn't needed for if:.
Is Path.IsPathRooted() available to the PowerShell version on the runners?
Shouldn't this be a Windows form of path? (/c/ProgramData/OpenTelemetry .NET AutoInstrumentation/logs)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions