From 679e23d4a31bcf7cd0a69acd348e5f79e8c6b443 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Thu, 12 Oct 2023 13:33:38 +0200 Subject: [PATCH] Improve documentation about the self-hosted input * Fixes https://github.com/ruby/setup-ruby/issues/535 --- README.md | 3 +++ action.yml | 2 +- common.js | 2 +- dist/index.js | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2578674e4..21300da79 100644 --- a/README.md +++ b/README.md @@ -263,6 +263,9 @@ In other cases, you will need to install Ruby in the runner tool cache as shown (run it so it will show you where to install Ruby). You could of course also not use this action and e.g. use Ruby from a system package or use a Docker image instead. +See also the [`self-hosted:` input](action.yml). +You can set it to `true` if you want to use custom-built Rubies in your self-hosted toolcache instead of prebuild Rubies. + ## History This action used to be at `eregon/use-ruby-action` and was moved to the `ruby` organization. diff --git a/action.yml b/action.yml index 55dbb3e1f..a81bff8b4 100644 --- a/action.yml +++ b/action.yml @@ -34,7 +34,7 @@ inputs: description: | Consider the runner as a self-hosted runner, which means not using prebuilt Ruby binaries which only work on GitHub-hosted runners or self-hosted runners with a very similar image to the ones used by GitHub runners. - The default is to detect this automatically based on the OS, OS version and $RUNNER_TOOL_CACHE. + The default is to detect this automatically based on the OS, OS version and architecture. outputs: ruby-prefix: description: 'The prefix of the installed ruby' diff --git a/common.js b/common.js index 0ba132033..96704ff1b 100644 --- a/common.js +++ b/common.js @@ -173,7 +173,7 @@ const GitHubHostedPlatforms = [ 'windows-2022-x64', ] -// Actually a self-hosted runner for which the OS and OS version does not correspond to a GitHub-hosted runner image, +// Actually a self-hosted runner for which the OS and OS version does not correspond to a GitHub-hosted runner image, export function isSelfHostedRunner() { if (inputs.selfHosted === undefined) { throw new Error('inputs.selfHosted should have been already set') diff --git a/dist/index.js b/dist/index.js index 93717ab79..b0deb07d4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -533,7 +533,7 @@ const GitHubHostedPlatforms = [ 'windows-2022-x64', ] -// Actually a self-hosted runner for which the OS and OS version does not correspond to a GitHub-hosted runner image, +// Actually a self-hosted runner for which the OS and OS version does not correspond to a GitHub-hosted runner image, function isSelfHostedRunner() { if (inputs.selfHosted === undefined) { throw new Error('inputs.selfHosted should have been already set')