switch user in crowdin action instead of changing owner after run#22554
Open
switch user in crowdin action instead of changing owner after run#22554
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Crowdin synchronization GitHub workflow to avoid post-run file ownership fixes by attempting to run the Crowdin action under a non-root user.
Changes:
- Adds
user: autoinput to thecrowdin/github-actionstep. - Removes the follow-up
sudo chownstep that previously corrected ownership of downloaded translation files.
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.
Ticket
What are you trying to accomplish?
The Crowdin GitHub Action runs as root inside a Docker container, causing downloaded translation files to be owned by root. This breaks subsequent workflow steps that need to edit or
git addthose files.What approach did you choose and why?
Use the
user: autoinput added in crowdin/github-action#309 (shipped in v2.16.0) to run the action as the workspace owner instead of root. This avoids the file ownership problem at the source, removing the need for the follow-upsudo chownstep.user: autoto thecrowdin/github-actionstep so the Docker container runs as the workspace owner (detected from.gitdirectory ownership)."Fix ownership of downloaded translation files"step that previously ransudo chownto correct ownership after the fact.Merge checklist
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.