fix(ci): checkout FxA code before setup-node in l10n-gettext-extract#20686
Open
StaberindeZA wants to merge 1 commit into
Open
fix(ci): checkout FxA code before setup-node in l10n-gettext-extract#20686StaberindeZA wants to merge 1 commit into
StaberindeZA wants to merge 1 commit into
Conversation
Because: - setup-node reads node-version-file from the runner filesystem at the time the step runs. In l10n-gettext-extract.yml the FxA repo is checked out into a 'fxa-code' subdirectory *after* setup-node, so '.nvmrc' did not exist on disk yet and setup-node failed with "Unable to locate '.nvmrc'". This commit: - Moves the "Clone FxA code repository" step ahead of "Set up Node" and points node-version-file at 'fxa-code/.nvmrc' so setup-node finds the file. The l10n repo checkout remains after setup-node since it is not needed for Node setup.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the l10n-gettext-extract GitHub Actions workflow so actions/setup-node can successfully resolve the Node version from the FxA repo’s .nvmrc when the repo is checked out into a subdirectory.
Changes:
- Moves the FxA repository checkout step to run before
actions/setup-node. - Updates
node-version-fileto point atfxa-code/.nvmrc(matching the checkout path).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Because
.github/workflows/l10n-gettext-extract.ymlthesetup-nodestep usesnode-version-file, but the FxA repo (which contains.nvmrc) is checked out into afxa-code/subdirectory aftersetup-noderuns. As Copilot pointed out on the merged PR, this meanssetup-nodecannot find.nvmrcon disk yet and the step would fail with "Unable to locate '.nvmrc'".This pull request
.github/workflows/l10n-gettext-extract.ymland pointsnode-version-fileatfxa-code/.nvmrcsosetup-nodecan resolve the file.setup-node, since it is not needed for Node setup.Issue that this pull request solves
Closes: N/A (chore-only CI fix, no ticket)
Checklist
Put an
xin the boxes that applyHow to review (Optional)
Screenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
This addresses the Copilot review comment on #20683 that landed after that PR was merged. The two other workflows touched in #20683 (
docker.yml,deploy-storybooks.yml) already check out the repo at the runner root beforesetup-node, so they did not need the same reorder.