Update lunar CLI version in attach action - #4
Conversation
v1.0.0 -> v1.1.1
📝 WalkthroughWalkthroughThe GitHub Actions composite action was updated to download the Lunar Linux AMD64 binary from the v1.1.1 release instead of v1.0.0, with only the download URL modified in the "Download Lunar binary" step. Changes
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
attach/action.yml (1)
7-57: 🛠️ Refactor suggestion | 🟠 MajorConsider adding a
lunar-versioninput parameter for consistency and flexibility.The sync-manifest action accepts a
lunar-versioninput parameter (as shown insync-manifest/action.yml:11-14), allowing users to specify which version to download. The attach action hardcodes v1.1.1, creating an inconsistency.This approach has several drawbacks:
- Version mismatch when both actions are used in the same workflow
- Requires code changes for version updates instead of workflow configuration changes
- Prevents users from testing or pinning specific versions
🔧 Proposed refactor to add version parameter
Add a
lunar-versioninput to match the sync-manifest action:inputs: github-token: description: > The GitHub token used to make authenticated API requests. Requires permissions to: 1) Clone manifest repo 2) ... default: ${{ github.token }} required: true + lunar-version: + description: > + Lunar version (vx.y.z), as one of the tags available at https://github.com/earthly/lunar-dist/tags + default: v1.1.1 + required: false manifest-url: description: > Lunar manifest repo URL, in the form of: github://<org>/<repo>@<branch> required: trueThen update the download URL to use the parameter:
run: | echo "pid $$ ppid $PPID" mkdir -p /tmp/lunar/bin - curl -L https://github.com/earthly/lunar-dist/releases/download/v1.1.1/lunar-linux-amd64 -o /tmp/lunar/bin/lunar + curl -L https://github.com/earthly/lunar-dist/releases/download/${{ inputs.lunar-version }}/lunar-linux-amd64 -o /tmp/lunar/bin/lunar chmod +x /tmp/lunar/bin/lunar; - echo "lunar downloaded to /tmp/lunar/bin/lunar"; + echo "Lunar ${{ inputs.lunar-version }} installed" shell: bash🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@attach/action.yml` around lines 7 - 57, Add a new input named lunar-version to the action inputs (matching the one in sync-manifest) and use that input in the "Download Lunar binary" step instead of the hardcoded v1.1.1; specifically, add the lunar-version input to the inputs block (with an appropriate default) and replace the hardcoded release tag in the curl download URL inside the "Download Lunar binary" run step to reference ${{ inputs.lunar-version }} so workflows can configure which Lunar release to download.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@attach/action.yml`:
- Line 57: The curl invocation that downloads lunar uses a non-existent tag
"v1.1.1"; update the URL in the shell line (the curl -L ... -o
/tmp/lunar/bin/lunar command) to reference an actual release tag such as
"v1.0.11" (or another valid tag from earthly/lunar-dist) so the download
succeeds; locate the curl command in attach/action.yml and replace the version
segment "/releases/download/v1.1.1/" with the correct
"/releases/download/v1.0.11/".
---
Outside diff comments:
In `@attach/action.yml`:
- Around line 7-57: Add a new input named lunar-version to the action inputs
(matching the one in sync-manifest) and use that input in the "Download Lunar
binary" step instead of the hardcoded v1.1.1; specifically, add the
lunar-version input to the inputs block (with an appropriate default) and
replace the hardcoded release tag in the curl download URL inside the "Download
Lunar binary" run step to reference ${{ inputs.lunar-version }} so workflows can
configure which Lunar release to download.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| echo "pid $$ ppid $PPID" | ||
| mkdir -p /tmp/lunar/bin | ||
| curl -L https://github.com/earthly/lunar-dist/releases/download/v1.0.0/lunar-linux-amd64 -o /tmp/lunar/bin/lunar | ||
| curl -L https://github.com/earthly/lunar-dist/releases/download/v1.1.1/lunar-linux-amd64 -o /tmp/lunar/bin/lunar |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify v1.1.1 release exists in earthly/lunar-dist
# Check if v1.1.1 release exists
gh api repos/earthly/lunar-dist/releases/tags/v1.1.1 --jq '.tag_name, .published_at, .prerelease'
# List recent releases for context
echo "Recent releases:"
gh api repos/earthly/lunar-dist/releases --jq '.[0:5] | .[] | "\(.tag_name) - \(.published_at)"'Repository: earthly/lunar-actions
Length of output: 385
🌐 Web query:
earthly lunar-dist v1.1.1 release
💡 Result:
No evidence found of an "earthly lunar-dist v1.1.1" release. The GitHub repository https://github.com/earthly/lunar-dist (part of Earthly's Lunar project, a platform for engineering standards and guardrails) has 11 releases with the latest being v1.0.11 on 2026-02-22. No mentions of v1.1.1 in release notes, changelogs, or official Earthly/Lunar documentation. "lunar-dist" appears to host Lunar binary releases, but v1.1.1 does not exist as of 2026-03-26.
Citations:
- 1: https://github.com/earthly/lunar-dist
- 2: https://github.com/earthly/earthly/releases
- 3: https://docs-lunar.earthly.dev/
- 4: https://www.earthly.dev/
- 5: https://earthly.dev/
🏁 Script executed:
#!/bin/bash
# Check if the v1.1.1 release is accessible via curl
# GitHub API allows unauthenticated requests with lower rate limits
echo "Checking GitHub API for v1.1.1 release info:"
curl -s "https://api.github.com/repos/earthly/lunar-dist/releases/tags/v1.1.1" | head -100
echo -e "\n\nChecking if the download URL is accessible:"
curl -I -s "https://github.com/earthly/lunar-dist/releases/download/v1.1.1/lunar-linux-amd64" | head -10
echo -e "\n\nListing recent releases:"
curl -s "https://api.github.com/repos/earthly/lunar-dist/releases?per_page=10" | grep -o '"tag_name":"[^"]*"' | head -10Repository: earthly/lunar-actions
Length of output: 1786
Remove non-existent version v1.1.1 and use a valid release.
The v1.1.1 release does not exist in the earthly/lunar-dist repository. The latest available release is v1.0.11 (2026-02-22). The curl command will fail when attempting to download from this non-existent version tag. Update the URL to point to an existing release.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@attach/action.yml` at line 57, The curl invocation that downloads lunar uses
a non-existent tag "v1.1.1"; update the URL in the shell line (the curl -L ...
-o /tmp/lunar/bin/lunar command) to reference an actual release tag such as
"v1.0.11" (or another valid tag from earthly/lunar-dist) so the download
succeeds; locate the curl command in attach/action.yml and replace the version
segment "/releases/download/v1.1.1/" with the correct
"/releases/download/v1.0.11/".
Summary
This fix was generated by AI.
Summary by CodeRabbit