Adds support for useHostNetwork the unity-builder (#828)

* fix: remove concurrency block from reusable workflow to prevent deadlock

When integrity-check.yml calls validate-orchestrator-integration.yml via
workflow_call, both workflows resolve github.workflow to the same name
("Integrity"), creating identical concurrency groups. GitHub detects this
as a deadlock and cancels the run.

Fix: remove concurrency from the reusable workflow entirely — the caller
already manages concurrency for the group.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add optional argument to action

* Add useHostNetwork to Input class

* Adds useHostNetwork to BuildParameters

* Uses useHostNetwork in docker arguments for the linux command

* Adds tests for Inputs

* Tests for Build Parameters

* Use latests unity version for Xcode compatibility with modern versions

* chore: rebuild dist after rebase onto main

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: frostebite <jas.f.ukcmti@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Daniel Lupiañez Casares
2026-05-03 19:14:33 +02:00
committed by GitHub
parent d10fd10a95
commit c7a43cde4d
11 changed files with 54 additions and 11 deletions

8
dist/index.js generated vendored
View File

@@ -327,6 +327,7 @@ class BuildParameters {
androidExportType: input_1.default.androidExportType,
androidSymbolType: androidSymbolExportType,
customParameters: input_1.default.customParameters,
useHostNetwork: input_1.default.useHostNetwork,
sshAgent: input_1.default.sshAgent,
sshPublicKeysDirectoryPath: input_1.default.sshPublicKeysDirectoryPath,
gitPrivateToken: input_1.default.gitPrivateToken ?? (await github_cli_1.GithubCliReader.GetGitHubAuthToken()),
@@ -637,7 +638,7 @@ class Docker {
return await (0, exec_1.exec)(runCommand, undefined, options);
}
static getLinuxCommand(image, parameters, overrideCommands = '', additionalVariables = [], entrypointBash = false) {
const { workspace, actionFolder, runnerTempPath, sshAgent, sshPublicKeysDirectoryPath, gitPrivateToken, dockerWorkspacePath, dockerCpuLimit, dockerMemoryLimit, } = parameters;
const { workspace, actionFolder, useHostNetwork, runnerTempPath, sshAgent, sshPublicKeysDirectoryPath, gitPrivateToken, dockerWorkspacePath, dockerCpuLimit, dockerMemoryLimit, } = parameters;
const githubHome = node_path_1.default.join(runnerTempPath, '_github_home');
if (!(0, node_fs_1.existsSync)(githubHome))
(0, node_fs_1.mkdirSync)(githubHome);
@@ -670,6 +671,7 @@ class Docker {
? '--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro'
: ''} \
${sshPublicKeysDirectoryPath ? `--volume ${sshPublicKeysDirectoryPath}:/root/.ssh:ro` : ''} \
${useHostNetwork ? '--net=host' : ''} \
${entrypointBash ? `--entrypoint ${commandPrefix}` : ``} \
${image} \
${entrypointBash ? `-c` : `${commandPrefix} -c`} \
@@ -1382,6 +1384,10 @@ class Input {
static get customParameters() {
return Input.getInput('customParameters') ?? '';
}
static get useHostNetwork() {
const input = Input.getInput('useHostNetwork') ?? false;
return input === 'true';
}
static get versioningStrategy() {
return Input.getInput('versioning') ?? 'Semantic';
}

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long