Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non runner user on self-hosted runners #583

Closed
2 tasks done
fkorotkov opened this issue Apr 22, 2024 · 3 comments
Closed
2 tasks done

Support non runner user on self-hosted runners #583

fkorotkov opened this issue Apr 22, 2024 · 3 comments

Comments

@fkorotkov
Copy link

Ensure the following before filing this issue

  • I verified it reproduces with the latest version with - uses: ruby/setup-ruby@v1 (see Versioning policy)

  • I tried to reproduce the issue locally by following the workflow steps (including all commands done by ruby/setup-ruby, except for Downloading Ruby & Extracting Ruby),
    and it did not reproduce locally (if it does reproduce locally, it's not a ruby/setup-ruby issue)

Are you running on a GitHub-hosted runner or a self-hosted runner?

self-hosted runner

Link to the failed workflow job (must be a public workflow job, so the necessary information is available)

https://github.com/cirruslabs/actions-playground/actions/runs/8781520697/job/24093712039

Any other notes?

Self-mosted macOS runners not always use runner as the user name. Right now runner user name is hard coded:

setup-ruby/common.js

Lines 267 to 269 in 6bd3d99

} else if (platform.startsWith('macos-')) {
return '/Users/runner/hostedtoolcache'
} else if (platform.startsWith('windows-')) {

Can probably be fixed similar to actions/setup-python#708

fkorotkov added a commit to fkorotkov/setup-ruby that referenced this issue Apr 22, 2024
@fkorotkov
Copy link
Author

Current workaround if you have "admin" user is to run the following first to pre-create /Users/runner:

- name: Ruby Workaround
  run: sudo mkdir -p /Users/runner && sudo chown -R admin:admin /Users/runner

@eregon
Copy link
Member

eregon commented Apr 22, 2024

See #584 (comment), it's not fixable.

@eregon eregon closed this as completed Apr 22, 2024
@eregon eregon closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2024
@eregon
Copy link
Member

eregon commented Apr 22, 2024

Basically the same as actions/setup-python#708 (comment) actually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants