Compare commits

...

9 Commits

Author SHA1 Message Date
frostebite
4233b08bae chore: rebuild dist after rebase onto main
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-03 18:04:51 +01:00
Daniel Lupiañez Casares
2badde1790 Use latests unity version for Xcode compatibility with modern versions 2026-05-03 18:04:17 +01:00
Daniel Lupiañez Casares
eba50f7627 Tests for Build Parameters 2026-05-03 18:04:17 +01:00
Daniel Lupiañez Casares
f8b20890d9 Adds tests for Inputs 2026-05-03 18:04:16 +01:00
Daniel Lupiañez Casares
b57598a959 Uses useHostNetwork in docker arguments for the linux command 2026-05-03 18:04:15 +01:00
Daniel Lupiañez Casares
7b2ec07fc1 Adds useHostNetwork to BuildParameters 2026-05-03 18:04:14 +01:00
Daniel Lupiañez Casares
3d3a018c23 Add useHostNetwork to Input class 2026-05-03 18:04:14 +01:00
Daniel Lupiañez Casares
a12e3e829e Add optional argument to action 2026-05-03 18:04:13 +01:00
frostebite
2321712bb4 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>
2026-05-03 17:18:12 +01:00
12 changed files with 57 additions and 14 deletions

View File

@@ -18,9 +18,9 @@ jobs:
projectPath:
- test-project
unityVersion:
- 2021.3.45f1
- 2022.3.13f1
- 2023.2.2f1
- 2021.3.45f2
- 2022.3.62f3
- 2023.2.22f1
targetPlatform:
- StandaloneOSX # Build a MacOS executable
- iOS # Build an iOS executable

View File

@@ -48,9 +48,9 @@ jobs:
projectPath:
- test-project
unityVersion:
- 2021.3.32f1
- 2022.3.13f1
- 2023.2.2f1
- 2021.3.45f2
- 2022.3.62f3
- 2023.2.22f1
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit) with mono backend.
- StandaloneWindows64 # Build a Windows 64-bit standalone with mono backend.

View File

@@ -18,9 +18,9 @@ jobs:
projectPath:
- test-project
unityVersion:
- 2021.3.32f1
- 2022.3.13f1
- 2023.2.2f1
- 2021.3.45f2
- 2022.3.62f3
- 2023.2.22f1
targetPlatform:
- Android # Build an Android apk.
- StandaloneWindows64 # Build a Windows 64-bit standalone.

View File

@@ -21,9 +21,9 @@ permissions:
checks: write
statuses: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Note: no concurrency block here — when invoked via workflow_call, the caller
# (integrity-check.yml) manages concurrency. For direct dispatch/cron, runs are
# naturally serialized by GitHub's single-concurrency-per-ref default.
env:
AWS_STACK_NAME: game-ci-team-pipelines

View File

@@ -47,6 +47,10 @@ inputs:
required: false
default: ''
description: 'Custom parameters to configure the build.'
useHostNetwork:
required: false
default: false
description: 'Initialises Docker using the host network. (Linux only)'
versioning:
required: false
default: 'Semantic'

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

View File

@@ -219,5 +219,10 @@ describe('BuildParameters', () => {
jest.spyOn(Input, 'customParameters', 'get').mockReturnValue(mockValue);
await expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ customParameters: mockValue }));
});
it.each([true, false])('returns the flag for useHostNetwork when %s', async (mockValue) => {
jest.spyOn(Input, 'useHostNetwork', 'get').mockReturnValue(mockValue);
await expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ useHostNetwork: mockValue }));
});
});
});

View File

@@ -47,6 +47,7 @@ class BuildParameters {
public containerRegistryImageVersion!: string;
public customParameters!: string;
public useHostNetwork!: boolean;
public sshAgent!: string;
public sshPublicKeysDirectoryPath!: string;
public providerStrategy!: string;
@@ -141,6 +142,7 @@ class BuildParameters {
androidExportType: Input.androidExportType,
androidSymbolType: androidSymbolExportType,
customParameters: Input.customParameters,
useHostNetwork: Input.useHostNetwork,
sshAgent: Input.sshAgent,
sshPublicKeysDirectoryPath: Input.sshPublicKeysDirectoryPath,
gitPrivateToken: Input.gitPrivateToken ?? (await GithubCliReader.GetGitHubAuthToken()),

View File

@@ -42,6 +42,7 @@ class Docker {
const {
workspace,
actionFolder,
useHostNetwork,
runnerTempPath,
sshAgent,
sshPublicKeysDirectoryPath,
@@ -85,6 +86,7 @@ class Docker {
: ''
} \
${sshPublicKeysDirectoryPath ? `--volume ${sshPublicKeysDirectoryPath}:/root/.ssh:ro` : ''} \
${useHostNetwork ? '--net=host' : ''} \
${entrypointBash ? `--entrypoint ${commandPrefix}` : ``} \
${image} \
${entrypointBash ? `-c` : `${commandPrefix} -c`} \

View File

@@ -334,4 +334,22 @@ describe('Input', () => {
expect(spy).toHaveBeenCalledTimes(1);
});
});
describe('useHostNetwork', () => {
it('returns the default value', () => {
expect(Input.useHostNetwork).toStrictEqual(false);
});
it('returns true when string true is passed', () => {
const spy = jest.spyOn(core, 'getInput').mockReturnValue('true');
expect(Input.useHostNetwork).toStrictEqual(true);
expect(spy).toHaveBeenCalledTimes(1);
});
it('returns false when string false is passed', () => {
const spy = jest.spyOn(core, 'getInput').mockReturnValue('false');
expect(Input.useHostNetwork).toStrictEqual(false);
expect(spy).toHaveBeenCalledTimes(1);
});
});
});

View File

@@ -139,6 +139,12 @@ class Input {
return Input.getInput('customParameters') ?? '';
}
static get useHostNetwork(): boolean {
const input = Input.getInput('useHostNetwork') ?? false;
return input === 'true';
}
static get versioningStrategy(): string {
return Input.getInput('versioning') ?? 'Semantic';
}