mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-01-29 12:19:06 +08:00
fix: use /bin/sh for Alpine-based images (rclone/rclone) in docker provider
This commit is contained in:
7
dist/index.js
generated
vendored
7
dist/index.js
generated
vendored
@@ -3735,7 +3735,8 @@ class LocalDockerCloudRunner {
|
||||
const sharedFolder = `/data/`;
|
||||
// core.info(JSON.stringify({ workspace, actionFolder, ...this.buildParameters, ...content }, undefined, 4));
|
||||
const entrypointFilePath = `start.sh`;
|
||||
const fileContents = `#!/bin/bash
|
||||
// Use #!/bin/sh for POSIX compatibility (Alpine-based images like rclone/rclone don't have bash)
|
||||
const fileContents = `#!/bin/sh
|
||||
set -e
|
||||
|
||||
mkdir -p /github/workspace/cloud-runner-cache
|
||||
@@ -8961,7 +8962,9 @@ class Docker {
|
||||
const githubWorkflow = node_path_1.default.join(runnerTempPath, '_github_workflow');
|
||||
if (!(0, node_fs_1.existsSync)(githubWorkflow))
|
||||
(0, node_fs_1.mkdirSync)(githubWorkflow);
|
||||
const commandPrefix = image === `alpine` ? `/bin/sh` : `/bin/bash`;
|
||||
// Alpine-based images (alpine, rclone/rclone, etc.) don't have /bin/bash, only /bin/sh
|
||||
const isAlpineBasedImage = image === 'alpine' || image.startsWith('rclone/');
|
||||
const commandPrefix = isAlpineBasedImage ? `/bin/sh` : `/bin/bash`;
|
||||
// Check if host.docker.internal is needed (for LocalStack access from containers)
|
||||
// Add host mapping if any environment variable contains host.docker.internal
|
||||
const environmentVariableString = image_environment_factory_1.default.getEnvVarString(parameters, additionalVariables);
|
||||
|
||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -137,7 +137,8 @@ class LocalDockerCloudRunner implements ProviderInterface {
|
||||
|
||||
// core.info(JSON.stringify({ workspace, actionFolder, ...this.buildParameters, ...content }, undefined, 4));
|
||||
const entrypointFilePath = `start.sh`;
|
||||
const fileContents = `#!/bin/bash
|
||||
// Use #!/bin/sh for POSIX compatibility (Alpine-based images like rclone/rclone don't have bash)
|
||||
const fileContents = `#!/bin/sh
|
||||
set -e
|
||||
|
||||
mkdir -p /github/workspace/cloud-runner-cache
|
||||
|
||||
@@ -55,7 +55,9 @@ class Docker {
|
||||
if (!existsSync(githubHome)) mkdirSync(githubHome);
|
||||
const githubWorkflow = path.join(runnerTempPath, '_github_workflow');
|
||||
if (!existsSync(githubWorkflow)) mkdirSync(githubWorkflow);
|
||||
const commandPrefix = image === `alpine` ? `/bin/sh` : `/bin/bash`;
|
||||
// Alpine-based images (alpine, rclone/rclone, etc.) don't have /bin/bash, only /bin/sh
|
||||
const isAlpineBasedImage = image === 'alpine' || image.startsWith('rclone/');
|
||||
const commandPrefix = isAlpineBasedImage ? `/bin/sh` : `/bin/bash`;
|
||||
|
||||
// Check if host.docker.internal is needed (for LocalStack access from containers)
|
||||
// Add host mapping if any environment variable contains host.docker.internal
|
||||
|
||||
Reference in New Issue
Block a user