ci: fix 'Argument list too long' in release-on-main workflow#171
Merged
benvinegar merged 2 commits intomainfrom Feb 24, 2026
Merged
ci: fix 'Argument list too long' in release-on-main workflow#171benvinegar merged 2 commits intomainfrom
benvinegar merged 2 commits intomainfrom
Conversation
PR context (140+ PRs with full bodies) was passed through GITHUB_OUTPUT and injected as env vars, exceeding ARG_MAX and preventing bash from starting. Fix: - Write PR context to /tmp/pr_context.json instead of GITHUB_OUTPUT - Read from file in downstream steps (jq --slurpfile / direct path) - Truncate PR bodies to 200 chars (Claude only needs titles + summary) - Remove PR_CONTEXT env vars from 'decide' and 'changelog' steps
Greptile SummaryFixes Linux
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 740ca48 |
- When no prior tag exists, look back 30 days instead of all time - Cap Claude's input to 50 most recent PRs (full list still used for changelog/release notes) - Prevents unbounded growth as the repo accumulates PRs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The release workflow fails with:
Root cause: PR context (140+ merged PRs with full bodies = ~155KB of JSON) was passed through
GITHUB_OUTPUTand then injected asPR_CONTEXTenv vars in the "Decide release bump" and "Build changelog" steps. This exceeded LinuxARG_MAX, preventing bash from starting at all.Since there are no release tags yet, the workflow gathered every merged PR since epoch.
Fix
/tmp/pr_context.json) instead of passing throughGITHUB_OUTPUT→ env varsjq --slurpfilefor the Anthropic payload, direct path for changelog)PR_CONTEXTenv vars from both thedecideandchangelogstepsVerification
yaml-lintpassesactionlintpasses (only shellcheck style suggestions, no errors)jq --slurpfilebehavior verified locallyTo verify on CI without merging
You can test this workflow on the branch by triggering it manually:
(Requires
workflow_dispatchtrigger, which is already configured)