Skip to content

[CI] Use environment variables instead of template expressions in workflow run blocks #49725

@thisisnic

Description

@thisisnic

Describe the enhancement

Several workflow files use ${{ }} template expressions directly inside run: blocks. These should be refactored to pass values through environment variables instead, which is the recommended best practice for GitHub Actions workflows.

Example

Before:

- run: |
    if [ "${{ inputs.upload }}" = true ]

After:

- run: |
    if [ "${UPLOAD}" = true ]
  env:
    UPLOAD: ${{ inputs.upload }}

Affected files

  • .github/actions/sync-nightlies/action.yml (inputs.upload)
  • .github/workflows/check_labels.yml (inputs.parent-workflow)
  • .github/workflows/comment_bot.yml (github.event_path)
  • .github/workflows/cpp_windows.yml (inputs.arch, steps.setup-msys2.outputs.msys2-location)
  • .github/workflows/integration.yml (github.event.repository.default_branch)
  • .github/workflows/report_ci.yml

Component(s)

Continuous Integration

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions