Repository navigation
Fix action install on GitHub runners and document Ruby prerequisites - #136
Merged
Merged
Conversation
GitHub-hosted runners make the system gem dir unwritable, so gem install falls back to a user dir that is not on PATH and the lint step cannot find se (#135). Pin GEM_HOME to a temp dir and append its bin to GITHUB_PATH.
The action runs the runner ruby and gem. Say so in the README, and warn self-hosted users off the macOS system Ruby, which is 2.6 and older than the supported floor.
The action just works on its runners, so it needs no runner note. The system Ruby warning belongs where a local, non-Ruby engineer hits it: right under gem install, pointing at the Homebrew install as the easy path.
Prefer the gem install over the Homebrew tap. On a Mac without Ruby, the note now builds the path: brew install ruby, put the directories brew info ruby lists on PATH, then install the gem.
…ve brew install ruby as one example path, and\nname version managers as the alternative. Tell, do not explain.
Pointing at brew caveats leaves the reader translating. Show the three export lines: brewed ruby, a stable GEM_HOME, and its bin dir. The paths never change with a Ruby upgrade.
Review call: the symptom and its condition carry the entry; the corrected behavior restates what a fix obviously does.
A local uses: ./ run executes the install step on a real hosted runner, where the version resolution and PATH wiring actually live. Both fixed bugs would have failed this job.
The se bin stub resolves the gem through RubyGems paths, which do not include the temp GEM_HOME outside the install step. The dogfood job caught this: se was on PATH but the gem was not found. GITHUB_ENV carries the home forward.
The env file command rejects a bare value. The previous push failed the dogfood job at the install step.
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.
Why is this change needed?
The action fails on GitHub-hosted runners. The install step reads
github.action_refwhere the runner leaves it empty (#133), then passeslatesttogem install --version, which is not a valid requirement. With the version supplied, the install still lands in a user gem dir that is not onPATH, so the lint step dies withse: command not found(#135). Local Mac installs hit the same wall with the 2.6 system Ruby, and non-Ruby users had no guide past it.What does this change do?
env, omit--versionwhen no concrete version is known, pinGEM_HOMEto a runner temp dir, and put itsbinonGITHUB_PATHfor the lint step.brew install rubypath with thePATHexports, and version managers as an alternative.uses: ./job, so the install step runs on a real hosted runner on every PR.Fixes #135. Refs #133 (fixed in #134).