Skip to content

ci: rename CI-internal workflow inputs to *_EARTHBUILD_*#645

Open
kmannislands wants to merge 1 commit into
mainfrom
rename-ci-workflow-vars
Open

ci: rename CI-internal workflow inputs to *_EARTHBUILD_*#645
kmannislands wants to merge 1 commit into
mainfrom
rename-ci-workflow-vars

Conversation

@kmannislands

Copy link
Copy Markdown

What

Renames two GitHub Actions inputs that are purely CI-internal plumbing:

Old New
BUILT_EARTHLY_PATH BUILT_EARTHBUILD_PATH
RUN_EARTHLY_TEST_ARGS RUN_EARTHBUILD_TEST_ARGS

These are reusable-workflow / composite-action inputs — the path to the built binary and extra test CLI args. Renamed consistently across every declaration (inputs:), consumer (${{ inputs.* }}), and caller (with:) in .github.

Scope / safety

  • Neither token is referenced outside .github, and neither is read by the earthly binary — pure CI plumbing, so runtime behavior is unchanged.
  • Left untouched: real env vars read by the tool (EARTHLY_VERSION_FLAG_OVERRIDES, EARTHLY_TOKEN, EARTHLY_ORG, EARTHLY_INSTALL_ID, EARTHLY_BUILDKIT_IMAGE, ...) and binary-path values like "./build/linux/amd64/earthly".

Verification

  • All changed workflow YAML parses (yaml.safe_load); input declarations still match their with:/inputs. references.
  • Reduces the tracked earthly line count by 65.

🤖 Generated with Claude Code

Renames two GitHub Actions inputs that are purely CI-internal plumbing:

  BUILT_EARTHLY_PATH     -> BUILT_EARTHBUILD_PATH
  RUN_EARTHLY_TEST_ARGS  -> RUN_EARTHBUILD_TEST_ARGS

These are reusable-workflow / composite-action inputs (the path to the
built binary and extra test CLI args). Renamed consistently across every
declaration (`inputs:`), consumer (`${{ inputs.* }}`), and caller
(`with:`) in .github. They have no consumers outside .github and are not
read by the earthly binary, so behavior is unchanged.

Left untouched: real env vars read by the tool (EARTHLY_VERSION_FLAG_OVERRIDES,
EARTHLY_TOKEN, EARTHLY_ORG, EARTHLY_INSTALL_ID, EARTHLY_BUILDKIT_IMAGE, ...)
and binary-path values like "./build/linux/amd64/earthly".

All changed workflow YAML parses. Reduces "earthly" line count by 65.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kmannislands kmannislands requested a review from a team as a code owner July 3, 2026 16:43
@kmannislands kmannislands added the ai-assisted Authored with AI assistance label Jul 3, 2026
@kmannislands kmannislands requested review from janishorsts and removed request for a team July 3, 2026 16:43
@kmannislands kmannislands added the ai-assisted Authored with AI assistance label Jul 3, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request renames the input parameter BUILT_EARTHLY_PATH to BUILT_EARTHBUILD_PATH in the stage2-setup GitHub Action and updates all of its references. The review feedback identifies multiple instances where the newly renamed path variable or its dirname command substitution is unquoted in shell commands. To prevent word splitting and potential execution failures if the path contains spaces, it is recommended to wrap these references in double quotes.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

chmod +x "${{inputs.BUILT_EARTHLY_PATH}}"
echo "Earthly binary installed from artifact to ${{inputs.BUILT_EARTHLY_PATH}}"
test -n "${{inputs.BUILT_EARTHBUILD_PATH}}" || (echo "BUILT_EARTHBUILD_PATH is empty" && exit 1)
mkdir -p $(dirname "${{inputs.BUILT_EARTHBUILD_PATH}}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The command substitution $(dirname ...) is unquoted. If the path in BUILT_EARTHBUILD_PATH contains spaces or special characters, this will result in word splitting and cause the mkdir command to fail. Wrap the command substitution in double quotes to ensure robustness.

        mkdir -p "$(dirname "${{inputs.BUILT_EARTHBUILD_PATH}}")"

test -n "${{inputs.BUILT_EARTHLY_PATH}}" || (echo "BUILT_EARTHLY_PATH is empty" && exit 1)
mkdir -p $(dirname "${{inputs.BUILT_EARTHLY_PATH}}")
test -n "${{inputs.BUILT_EARTHBUILD_PATH}}" || (echo "BUILT_EARTHBUILD_PATH is empty" && exit 1)
mkdir -p $(dirname "${{inputs.BUILT_EARTHBUILD_PATH}}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The command substitution $(dirname ...) is unquoted. Wrap it in double quotes to prevent word splitting if the path contains spaces.

        mkdir -p "$(dirname "${{inputs.BUILT_EARTHBUILD_PATH}}")"

- run: |-
echo "Configuring earthbuild to use GCR mirror"
${{inputs.BUILT_EARTHLY_PATH}} config global.buildkit_additional_config "'[registry.\"docker.io\"]
${{inputs.BUILT_EARTHBUILD_PATH}} config global.buildkit_additional_config "'[registry.\"docker.io\"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The binary path ${{inputs.BUILT_EARTHBUILD_PATH}} is unquoted. Wrap it in double quotes to prevent shell parsing errors if the path contains spaces.

        "${{inputs.BUILT_EARTHBUILD_PATH}}" config global.buildkit_additional_config "'[registry.\"docker.io\"]

export expected_buildkit_client_sha="$(cat earthly-next | head -c 12)"
test -n "$expected_buildkit_client_sha" || ( echo "expected_buildkit_client_sha is empty" && exit 1)
(strings ${{inputs.BUILT_EARTHLY_PATH}} | grep "$expected_buildkit_client_sha" ) || ( echo "expected to find $expected_buildkit_client_sha in earthly binary" && exit 1)
(strings ${{inputs.BUILT_EARTHBUILD_PATH}} | grep "$expected_buildkit_client_sha" ) || ( echo "expected to find $expected_buildkit_client_sha in earthly binary" && exit 1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The binary path ${{inputs.BUILT_EARTHBUILD_PATH}} is unquoted inside the strings command. Wrap it in double quotes to prevent word splitting.

        (strings "${{inputs.BUILT_EARTHBUILD_PATH}}" | grep "$expected_buildkit_client_sha" ) || ( echo "expected to find $expected_buildkit_client_sha in earthly binary" && exit 1)

shell: bash
- if: ${{ inputs.BINARY == 'podman' }}
run: ${{inputs.SUDO}} ${{inputs.BUILT_EARTHLY_PATH}} bootstrap
run: ${{inputs.SUDO}} ${{inputs.BUILT_EARTHBUILD_PATH}} bootstrap

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The binary path ${{inputs.BUILT_EARTHBUILD_PATH}} is unquoted. Wrap it in double quotes to prevent word splitting.

      run: ${{inputs.SUDO}} "${{inputs.BUILT_EARTHBUILD_PATH}}" bootstrap

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

🎉 Are we earthbuild yet?

Great progress! You've reduced "earthly" occurrences by 65 (1.20%)

📈 Overall Progress

Branch Total Count
main 5408
This PR 5343
Difference -65 (1.2%)

Keep up the great work migrating from Earthly to Earthbuild! 🚀

💡 Tips for finding more occurrences

Run locally to see detailed breakdown:

./.github/scripts/count-earthly.sh

Note that the goal is not to reach 0.
There is anticipated to be at least some occurences of earthly in the source code due to backwards compatibility with config files and language constructs.

required: false
default: 'latest'
BUILT_EARTHLY_PATH:
BUILT_EARTHBUILD_PATH:

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.

Based on this comment, I would prefer EARTH instead of EARHBUILD.

Suggested change
BUILT_EARTHBUILD_PATH:
BUILT_EARTH_PATH:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Authored with AI assistance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants