Fix unused import, remove docker build test
							parent
							
								
									1676f3ba95
								
							
						
					
					
						commit
						a48af4b185
					
				|  | @ -3285,24 +3285,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) { | |||
| }; | ||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||
| const exec_1 = __nccwpck_require__(71514); | ||||
| const image_tag_1 = __importDefault(__nccwpck_require__(57648)); | ||||
| const image_environment_factory_1 = __importDefault(__nccwpck_require__(25145)); | ||||
| const fs_1 = __nccwpck_require__(57147); | ||||
| const path_1 = __importDefault(__nccwpck_require__(71017)); | ||||
| class Docker { | ||||
|     static build(buildParameters, silent = false) { | ||||
|         return __awaiter(this, void 0, void 0, function* () { | ||||
|             const { path: buildPath, dockerfile, baseImage } = buildParameters; | ||||
|             const { version, platform } = baseImage; | ||||
|             const tag = new image_tag_1.default({ repository: '', name: 'unity-builder', version, platform }); | ||||
|             const command = `docker build ${buildPath} \
 | ||||
|       --file ${dockerfile} \ | ||||
|       --build-arg IMAGE=${baseImage} \ | ||||
|       --tag ${tag}`;
 | ||||
|             yield exec_1.exec(command, undefined, { silent }); | ||||
|             return tag; | ||||
|         }); | ||||
|     } | ||||
|     static run(image, parameters, silent = false) { | ||||
|         return __awaiter(this, void 0, void 0, function* () { | ||||
|             let runCommand = ''; | ||||
|  | @ -3317,7 +3303,7 @@ class Docker { | |||
|         }); | ||||
|     } | ||||
|     static getLinuxCommand(image, parameters) { | ||||
|         const { workspace, actionFolder, unitySerial, runnerTempPath, sshAgent } = parameters; | ||||
|         const { workspace, actionFolder, runnerTempPath, sshAgent } = parameters; | ||||
|         const githubHome = path_1.default.join(runnerTempPath, '_github_home'); | ||||
|         if (!fs_1.existsSync(githubHome)) | ||||
|             fs_1.mkdirSync(githubHome); | ||||
|  |  | |||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -1,20 +0,0 @@ | |||
| ARG IMAGE | ||||
| FROM $IMAGE | ||||
| 
 | ||||
| LABEL "com.github.actions.name"="Unity - Builder" | ||||
| LABEL "com.github.actions.description"="Build Unity projects for different platforms." | ||||
| LABEL "com.github.actions.icon"="box" | ||||
| LABEL "com.github.actions.color"="gray-dark" | ||||
| 
 | ||||
| LABEL "repository"="http://github.com/game-ci/unity-actions" | ||||
| LABEL "homepage"="http://github.com/game-ci/unity-actions" | ||||
| LABEL "maintainer"="Webber Takken <webber@takken.io>" | ||||
| 
 | ||||
| COPY default-build-script /UnityBuilderAction | ||||
| COPY platforms/ubuntu/steps /steps | ||||
| RUN chmod -R +x /steps | ||||
| COPY platforms/ubuntu/entrypoint.sh /entrypoint.sh | ||||
| RUN chmod +x /entrypoint.sh | ||||
| RUN ls | ||||
| 
 | ||||
| ENTRYPOINT ["/entrypoint.sh"] | ||||
|  | @ -1,19 +0,0 @@ | |||
| ARG IMAGE | ||||
| FROM $IMAGE | ||||
| 
 | ||||
| LABEL "com.github.actions.name"="Unity - Builder" | ||||
| LABEL "com.github.actions.description"="Build Unity projects for different platforms." | ||||
| LABEL "com.github.actions.icon"="box" | ||||
| LABEL "com.github.actions.color"="gray-dark" | ||||
| 
 | ||||
| LABEL "repository"="http://github.com/game-ci/unity-actions" | ||||
| LABEL "homepage"="http://github.com/game-ci/unity-actions" | ||||
| LABEL "maintainer"="Webber Takken <webber@takken.io>" | ||||
| 
 | ||||
| COPY default-build-script c:/UnityBuilderAction | ||||
| COPY platforms/windows/steps c:/steps | ||||
| COPY platforms/windows/entrypoint.ps1 c:/entrypoint.ps1 | ||||
| COPY BlankProject c:/BlankProject | ||||
| RUN dir | ||||
| 
 | ||||
| ENTRYPOINT ["powershell", "c:/entrypoint.ps1"] | ||||
|  | @ -1,21 +1,7 @@ | |||
| import Action from './action'; | ||||
| import Docker from './docker'; | ||||
| import ImageTag from './image-tag'; | ||||
| 
 | ||||
| describe('Docker', () => { | ||||
|   it.skip('builds', async () => { | ||||
|     const path = Action.actionFolder; | ||||
|     const dockerfile = `${path}/Dockerfile`; | ||||
|     const baseImage = new ImageTag({ | ||||
|       repository: '', | ||||
|       name: 'alpine', | ||||
|       version: '3', | ||||
|       platform: 'Test', | ||||
|     }); | ||||
|     const tag = await Docker.build({ path, dockerfile, baseImage }, true); | ||||
|     expect(tag).toBeInstanceOf(ImageTag); | ||||
|     expect(tag.toString()).toStrictEqual('unity-builder:3'); | ||||
|   }, 240000); | ||||
|   it.skip('runs', async () => { | ||||
|     const image = 'unity-builder:2019.2.11f1-webgl'; | ||||
|     const parameters = { | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| import { exec } from '@actions/exec'; | ||||
| import ImageTag from './image-tag'; | ||||
| import ImageEnvironmentFactory from './image-environment-factory'; | ||||
| import { existsSync, mkdirSync } from 'fs'; | ||||
| import path from 'path'; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue