Summary
GitHub runners need a proper $HOME variable to allow tools like uv to store their configuration and cache files. Currently, without a proper GitHub runner home directory, the $HOME variable defaults to the root directory /, and GitHub runners don't have sudo rights to write inside this directory.
Current Situation
We cannot run as the root user due to github action issue
.
We already have necessary workarounds in place:
chown $(id -u):$(id -g) -R . to fix dubious ownership
--user parameter with GitHub runner UID/GID during the run-on-image action
Important: The chown and --user workarounds must remain as they exist to address the GitHub Actions runner ownership issue (actions/runner-images#6775).
The core issue is that $HOME defaults to / (root directory) when no proper home is defined, and GitHub runners lack sudo privileges to write to this location. This prevents tools like uv from storing their files in appropriate directories.
References on where uv stores files:
Current Solution
- set
HOME=/tmp as a temporary solution
- Mount the deps image to
/mnt/repo
Proposed Solution
Define a proper $HOME directory for GitHub runners:
- Set $HOME to a writable directory (not
/tmp as a temporary measure)
- Mount the image to
$HOME/clp instead of /mnt/repo
- Ensure tools like
uv can store files following the XDG Base Directory Specification
Benefits
- Tools like
uv can properly store configuration and cache files
- Cleaner CI environment with proper directory structure
- Eliminates the need for
HOME=/tmp workaround
- Maintains compatibility with existing ownership workarounds
Backlinks
Reported by: @Bill-hbrhbr
Summary
GitHub runners need a proper $HOME variable to allow tools like
uvto store their configuration and cache files. Currently, without a proper GitHub runner home directory, the $HOME variable defaults to the root directory/, and GitHub runners don't have sudo rights to write inside this directory.Current Situation
We cannot run as the root user due to github action issue
.
We already have necessary workarounds in place:
chown $(id -u):$(id -g) -R .to fix dubious ownership--userparameter with GitHub runner UID/GID during therun-on-imageactionImportant: The
chownand--userworkarounds must remain as they exist to address the GitHub Actions runner ownership issue (actions/runner-images#6775).The core issue is that $HOME defaults to
/(root directory) when no proper home is defined, and GitHub runners lack sudo privileges to write to this location. This prevents tools likeuvfrom storing their files in appropriate directories.References on where
uvstores files:Current Solution
HOME=/tmpas a temporary solution/mnt/repoProposed Solution
Define a proper $HOME directory for GitHub runners:
/tmpas a temporary measure)$HOME/clpinstead of/mnt/repouvcan store files following the XDG Base Directory SpecificationBenefits
uvcan properly store configuration and cache filesHOME=/tmpworkaroundBacklinks
yscope-dev-utilsto the newest version: #1126yscope-dev-utilsto the newest version: #1126 (comment)Reported by: @Bill-hbrhbr