Allow Running Container as Runner Host User (#600)
- Added `runAsHostUser` to allow running the container as the same user as the host system. This fixes most permissions issues on self-hosted runners. - Perform android sdk setup during entrypoint.sh to ensure it has root permissions if the user switches to a non-root user - Automatically detect android sdk target version if parameters are not already provided to configure the sdk - Generate a new uuid for machineID to ensure separate containers are unique to reduce license activation errors - Add exponential retry strategy for Ubuntu license activations
This commit is contained in:
5
dist/index.js
generated
vendored
5
dist/index.js
generated
vendored
@@ -312,6 +312,7 @@ class BuildParameters {
|
||||
sshAgent: input_1.default.sshAgent,
|
||||
sshPublicKeysDirectoryPath: input_1.default.sshPublicKeysDirectoryPath,
|
||||
gitPrivateToken: input_1.default.gitPrivateToken || (await github_cli_1.GithubCliReader.GetGitHubAuthToken()),
|
||||
runAsHostUser: input_1.default.runAsHostUser,
|
||||
chownFilesTo: input_1.default.chownFilesTo,
|
||||
dockerCpuLimit: input_1.default.dockerCpuLimit,
|
||||
dockerMemoryLimit: input_1.default.dockerMemoryLimit,
|
||||
@@ -6337,6 +6338,7 @@ class ImageEnvironmentFactory {
|
||||
{ name: 'ANDROID_EXPORT_TYPE', value: parameters.androidExportType },
|
||||
{ name: 'ANDROID_SYMBOL_TYPE', value: parameters.androidSymbolType },
|
||||
{ name: 'CUSTOM_PARAMETERS', value: parameters.customParameters },
|
||||
{ name: 'RUN_AS_HOST_USER', value: parameters.runAsHostUser },
|
||||
{ name: 'CHOWN_FILES_TO', value: parameters.chownFilesTo },
|
||||
{ name: 'GITHUB_REF', value: process.env.GITHUB_REF },
|
||||
{ name: 'GITHUB_SHA', value: process.env.GITHUB_SHA },
|
||||
@@ -6908,6 +6910,9 @@ class Input {
|
||||
static get gitPrivateToken() {
|
||||
return Input.getInput('gitPrivateToken');
|
||||
}
|
||||
static get runAsHostUser() {
|
||||
return Input.getInput('runAsHostUser') || 'false';
|
||||
}
|
||||
static get chownFilesTo() {
|
||||
return Input.getInput('chownFilesTo') || '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user