mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
parent
89bdaa5e46
commit
977683cd5f
@ -106,6 +106,8 @@ inputs:
|
||||
outputs:
|
||||
volume:
|
||||
description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes'
|
||||
buildVersion:
|
||||
description: 'The generated version used for the Unity build'
|
||||
branding:
|
||||
icon: 'box'
|
||||
color: 'gray-dark'
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
import { Action, BuildParameters, Cache, Docker, ImageTag, Kubernetes } from './model';
|
||||
import { Action, BuildParameters, Cache, Docker, ImageTag, Kubernetes, Output } from './model';
|
||||
|
||||
const core = require('@actions/core');
|
||||
|
||||
@ -25,6 +25,9 @@ async function action() {
|
||||
});
|
||||
await Docker.run(builtImage, { workspace, ...buildParameters });
|
||||
}
|
||||
|
||||
// Set output
|
||||
await Output.setBuildVersion(buildParameters.buildVersion);
|
||||
}
|
||||
|
||||
action().catch((error) => {
|
||||
|
@ -4,6 +4,7 @@ import Cache from './cache';
|
||||
import Docker from './docker';
|
||||
import Input from './input';
|
||||
import ImageTag from './image-tag';
|
||||
import Output from './output';
|
||||
import Platform from './platform';
|
||||
import Project from './project';
|
||||
import Unity from './unity';
|
||||
@ -17,6 +18,7 @@ export {
|
||||
Docker,
|
||||
Input,
|
||||
ImageTag,
|
||||
Output,
|
||||
Platform,
|
||||
Project,
|
||||
Unity,
|
||||
|
9
src/model/output.js
Normal file
9
src/model/output.js
Normal file
@ -0,0 +1,9 @@
|
||||
const core = require('@actions/core');
|
||||
|
||||
class Output {
|
||||
static async setBuildVersion(buildVersion) {
|
||||
await core.setOutput('buildVersion', buildVersion);
|
||||
}
|
||||
}
|
||||
|
||||
export default Output;
|
9
src/model/output.test.js
Normal file
9
src/model/output.test.js
Normal file
@ -0,0 +1,9 @@
|
||||
import Output from './output';
|
||||
|
||||
describe('Output', () => {
|
||||
describe('setBuildVersion', () => {
|
||||
it('does not throw', async () => {
|
||||
await expect(Output.setBuildVersion('1.0.0')).resolves.not.toThrow();
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user