mirror of
https://github.com/game-ci/unity-activate
synced 2026-02-05 10:49:15 +08:00
Upgrade to use typescript instead of javascript and use game-ci images
* Upgrade to using typescript instead of javascript and use game-ci images instead of gableroux images * Fix errors * Update bash script * Fix test * Remove test * Add versioning * Update husky * Update husky * Update husky * Update package.json * Update husky and image-tag * Use 'yarn lint-staged' instead of 'npx lint-staged' * Update entrypoint.sh
This commit is contained in:
22
src/index.ts
Normal file
22
src/index.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import * as core from '@actions/core';
|
||||
import { Action, Docker, ImageTag, Input } from './model';
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
Action.checkCompatibility();
|
||||
|
||||
const { dockerfile, workspace, actionFolder } = Action;
|
||||
const unityVersion = Input.unityVersion;
|
||||
const baseImage = new ImageTag(unityVersion);
|
||||
|
||||
// Build docker image
|
||||
const actionImage = await Docker.build({ path: actionFolder, dockerfile, baseImage });
|
||||
|
||||
// Run docker image
|
||||
await Docker.run(actionImage, { workspace, unityVersion });
|
||||
} catch (error: any) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
Reference in New Issue
Block a user