Skip to content

[WEB-10192] fix: pass build-branch inputs through env - #10296

Merged
sriramveeraghanta merged 1 commit into
previewfrom
fix/web-10192-build-branch-env-inputs
Nov 16, 2026
Merged

sriramveeraghanta merged 1 commit into
previewfrom
fix/web-10192-build-branch-env-inputs

Conversation

@pablohashescobar

@pablohashescobar pablohashescobar commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Description

build-branch.yml expanded ${{ env.* }} values (workflow_dispatch inputs and the ref name) and job outputs directly inside run scripts, so Actions substituted them into the script text before the shell parsed it.

  • The set_env_variables step now reads the workflow-level env vars as shell variables ($BUILD_TYPE, $RELEASE_VERSION, $TARGET_BRANCH, …).
  • The two later steps that used needs.branch_build_setup.outputs.* in their scripts bind those outputs through a step env: block.

feature-deployment.yml already follows this pattern. No change to what the workflow builds or tags.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

  • Ran the rewritten set_env_variables script locally under bash with a normal release input (v1.5.0 on preview): outputs are the same as before (BUILD_RELEASE=true, RELEASE_VERSION=v1.5.0, both platforms in the matrix).
  • Ran it with shell metacharacters in the release version and branch name: they are treated as data, the invalid version is rejected by the existing SemVer check, and nothing from the input runs.
  • The workflow file parses, and no run script contains a ${{ }} expression any more.

Not run on GitHub: please trigger a branch build and a release dry run before merging.

References

  • WEB-10192

Created with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated the build workflow’s handling of branch names and release inputs.
    • Build architecture selection and release-version validation remain unchanged, so this update does not alter the resulting build options or release behavior.

Dispatch inputs, the ref name and job outputs were expanded into run
scripts by Actions before the shell parsed them. Read them as shell
variables instead, the way feature-deployment.yml already does.
Copilot AI balanced review requested due to automatic review settings November 15, 2026 22:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@makeplane

makeplane Bot commented Nov 15, 2026

Copy link
Copy Markdown

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The build workflow now passes selected inputs and the branch name to shell scripts through environment variables. Matrix selection, release-version validation, and prerelease handling remain unchanged.

Changes: Build workflow input handling

Layer / File(s) Summary
Read workflow inputs from environment variables
.github/workflows/build-branch.yml
The build matrix, release setup, AIO asset preparation, and asset update steps read inputs and the branch name from shell variables. Existing matrix and release-selection behavior remains unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: mguptahub

Merge Risk: Minimal · up to 41ba5

The workflow now reads build inputs and the branch name through environment variables rather than expanding them into shell scripts. No concrete problem was found. A branch build and release dry run on GitHub are still worth doing before merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Description check Passed The description follows the template's main sections: Description, Type of Change (Bug fix checked), Screenshots placeholder, Test Scenarios, and References (WEB-10192). It explains the problem and th…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title names the main change: build-branch workflow inputs and the ref name are now passed through environment variables instead of being expanded into run scripts. It also matches the PR objective…
Full details: Description check

Explanation

The description follows the template's main sections: Description, Type of Change (Bug fix checked), Screenshots placeholder, Test Scenarios, and References (WEB-10192). It explains the problem and the fix, and it lists concrete local test results. The Screenshots section keeps its placeholder comment, which is acceptable because the template marks it as applicable only when relevant. The description states that the workflow was not run on GitHub and asks for a branch build and release dry run before merge.

Full details: Title check

Explanation

The title names the main change: build-branch workflow inputs and the ref name are now passed through environment variables instead of being expanded into run scripts. It also matches the PR objective of fixing the injection risk. The title is short and specific, and it uses the standard [ticket] type: summary format.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 57395af4-cb5c-4bb2-9177-72d093247a2c
Commits

Reviewing files that changed from the base of the PR and between 290383d and 41ba53b.

Files selected for processing: 1

  • .github/workflows/build-branch.yml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@pablohashescobar pablohashescobar changed the title [WEB-10192] fix(security): pass build-branch inputs through env [WEB-10192] fix: pass build-branch inputs through env Nov 16, 2026

@sriramveeraghanta sriramveeraghanta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Every variable set_env_variables reads is defined in the workflow env, and no ${{ }} is left in a run script. Worth the branch build and release dry run the description mentions.

@sriramveeraghanta
sriramveeraghanta merged commit 8aba9ba into preview Nov 16, 2026
15 checks passed
@sriramveeraghanta
sriramveeraghanta deleted the fix/web-10192-build-branch-env-inputs branch November 16, 2026 20:22
sriramveeraghanta pushed a commit that referenced this pull request Nov 16, 2026
Dispatch inputs, the ref name and job outputs were expanded into run
scripts by Actions before the shell parsed them. Read them as shell
variables instead, the way feature-deployment.yml already does.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants