Skip to content

ci: quote and group GITHUB_ENV writes - #401

Merged
AnthonyRonning merged 1 commit into
masterfrom
chore/github-env-redirects
Jan 23, 2026
Merged

ci: quote and group GITHUB_ENV writes#401
AnthonyRonning merged 1 commit into
masterfrom
chore/github-env-redirects

Conversation

@AnthonyRonning

@AnthonyRonningAnthonyRonning commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

Quotes "$GITHUB_ENV" and groups redirects for env writes across workflows (avoids ShellCheck SC2086/SC2129).


Open with Devin

Summary by CodeRabbit

  • Chores
    • Consolidated environment variable writes across CI workflows to append grouped assignments in a single operation, reducing repeated I/O.
    • Standardized quoting and shell grouping for safer, more atomic environment file handling.
    • No changes to build outputs or runtime behavior; functional results remain unchanged.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitaiBot commented Jan 23, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Multiple GitHub Actions workflows were edited to consolidate separate environment-variable echo/appends into single grouped blocks and to quote the environment file path (e.g., "$GITHUB_ENV"/"$GITHUB_OUTPUT"); functionality and step ordering remain unchanged.

Changes

Cohort / File(s)Summary
Environment variable consolidation
.github/workflows/...
/.github/workflows/android-build.yml, /.github/workflows/claude.yml, /.github/workflows/release.yml, /.github/workflows/rust-tests.yml
Replaced multiple echo ... >> $GITHUB_ENV lines with a single grouped block that echoes several environment assignments and appends them once to "$GITHUB_ENV".
Environment file path quoting
/.github/workflows/mobile-build.yml, /.github/workflows/testflight-on-comment.yml
Changed >> $GITHUB_ENV to >> "$GITHUB_ENV" (quoted) when writing an environment variable path.
Mixed consolidation and quoting
/.github/workflows/desktop-build.yml
Multiple sccache/configure steps updated: grouped multi-line env writes into single block appends to "$GITHUB_ENV", and some occurrences of CERT_ID and other vars now use the quoted env path.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 I hop through CI with nimble feet,
Grouping echoes into tidy sheets,
Quoted paths keep troubles at bay,
One write at once—neat as play.
Hooray for cleaner workflow treats! 🎉

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title 'ci: quote and group GITHUB_ENV writes' accurately summarizes the main changes: quoting GITHUB_ENV variables and grouping multiple echo commands into single blocks across workflow files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages

cloudflare-workers-and-pagesBot commented Jan 23, 2026

Copy link
Copy Markdown

Deploying maple with Cloudflare Pages Cloudflare Pages

Latest commit:8cba5a2
Status: ✅ Deploy successful!
Preview URL:https://5cf3b601.maple-ca8.pages.dev
Branch Preview URL:https://chore-github-env-redirects.maple-ca8.pages.dev

View logs

@devin-ai-integrationdevin-ai-integrationBot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional flag.

Open in Devin Review

@greptile-apps

greptile-appsBot commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

Fixed ShellCheck warnings SC2086 and SC2129 across all GitHub Actions workflows by quoting "$GITHUB_ENV" and "$GITHUB_OUTPUT" variables and grouping multiple echo redirects using brace syntax.

Changes made:

  • Quoted $GITHUB_ENV to prevent word splitting issues if the variable contains spaces
  • Grouped multiple environment variable writes using { echo ...; } >> "$GITHUB_ENV" syntax to reduce file I/O operations
  • Applied the same fix to $GITHUB_OUTPUT in release.yml
  • No functional changes - purely improves shell script safety and follows ShellCheck best practices

Confidence Score: 5/5

  • This PR is completely safe to merge with no risk
  • The changes are purely syntactic improvements to shell scripts that fix ShellCheck warnings. The modifications (quoting variables and grouping redirects) follow shell scripting best practices and have no impact on functionality. All changes are consistent and correctly applied across all workflow files.
  • No files require special attention

Important Files Changed

FilenameOverview
.github/workflows/android-build.ymlGrouped sccache environment variable writes and quoted $GITHUB_ENV
.github/workflows/claude.ymlGrouped sccache environment variable writes and quoted $GITHUB_ENV
.github/workflows/desktop-build.ymlGrouped sccache environment variable writes and quoted $GITHUB_ENV in multiple jobs
.github/workflows/mobile-build.ymlQuoted $GITHUB_ENV for Apple API key path variable
.github/workflows/release.ymlGrouped sccache writes, quoted $GITHUB_ENV and $GITHUB_OUTPUT
.github/workflows/rust-tests.ymlGrouped sccache environment variable writes and quoted $GITHUB_ENV
.github/workflows/testflight-on-comment.ymlQuoted $GITHUB_ENV for Apple API key path variable

Sequence Diagram

sequenceDiagram
participant GHA as GitHub Actions
participant Shell as Shell Script
participant ENV as GITHUB_ENV File
Note over GHA,ENV: Before PR (Multiple Writes)
GHA->>Shell: Execute Configure sccache step
Shell->>ENV: echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
Shell->>ENV: echo "SCCACHE_DIR=$HOME/.cache/sccache" >> $GITHUB_ENV
Shell->>ENV: echo "SCCACHE_CACHE_SIZE=2G" >> $GITHUB_ENV
Note over Shell,ENV: ⚠️ Unquoted variable + 3 separate file operations
Note over GHA,ENV: After PR (Grouped & Quoted)
GHA->>Shell: Execute Configure sccache step
Shell->>ENV: { echo statements } >> "$GITHUB_ENV"
Note over Shell,ENV: ✅ Quoted variable + single grouped operation
ENV->>GHA: Environment variables available for next steps
Loading

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@AnthonyRonning
AnthonyRonningforce-pushed the chore/github-env-redirects branch from 160b83a to 8cba5a2CompareJanuary 23, 2026 16:33
@AnthonyRonning
AnthonyRonning merged commit 170286a into masterJan 23, 2026
9 checks passed
@AnthonyRonning
AnthonyRonning deleted the chore/github-env-redirects branch January 23, 2026 16:42
Sign up for freeto 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.

1 participant

@AnthonyRonning