Add a self-hosted input to force considering the current runner as self-hosted

* Since checking for self-hosted is based on guessing as there is
  no proper predicate for it in GitHub Actions (AFAIK).
This commit is contained in:
Benoit Daloze
2023-03-03 18:01:46 +01:00
parent 377a94bc68
commit d01c52ad8b
4 changed files with 32 additions and 4 deletions
+2
View File
@@ -16,6 +16,7 @@ const inputDefaults = {
'bundler-cache': 'false',
'working-directory': '.',
'cache-version': bundler.DEFAULT_CACHE_VERSION,
'self-hosted': 'false',
}
// entry point when this action is run on its own
@@ -39,6 +40,7 @@ export async function setupRuby(options = {}) {
inputs[key] = core.getInput(key) || inputDefaults[key]
}
}
common.inputs.selfHosted = inputs['self-hosted']
process.chdir(inputs['working-directory'])