├── .github └── workflows │ └── main.yml ├── README.md ├── action.yml ├── node_modules └── @actions │ ├── core │ ├── README.md │ ├── lib │ │ ├── command.d.ts │ │ ├── command.js │ │ ├── command.js.map │ │ ├── core.d.ts │ │ ├── core.js │ │ └── core.js.map │ └── package.json │ └── exec │ ├── LICENSE.md │ ├── README.md │ ├── lib │ ├── exec.d.ts │ ├── exec.js │ ├── exec.js.map │ ├── interfaces.d.ts │ ├── interfaces.js │ ├── interfaces.js.map │ ├── toolrunner.d.ts │ ├── toolrunner.js │ └── toolrunner.js.map │ └── package.json ├── package-lock.json ├── package.json └── runMongoDBAsDocker.js /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | on: [push] 2 | 3 | jobs: 4 | StartMongoDBAsDocker: 5 | runs-on: ubuntu-latest 6 | strategy: 7 | matrix: 8 | mongodb-version: ["4.0", "4.2"] 9 | name: Start MongoDB ${{ matrix.mongodb-version }} 10 | steps: 11 | - name: Checkout 12 | uses: actions/checkout@v1 13 | - name: Start MongoDB As Docker 14 | uses: ./ 15 | with: 16 | mongoDBVersion: ${{ matrix.mongodb-version }} 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Start MongoDB as Docker Container JavaScript Action 2 | Starts the specific version of MongoDB as a detach Docker container 3 | 4 | 5 | ## Inputs 6 | 7 | ### `mongoDbVersion` 8 | 9 | **Required** The version of mongoDB. Default `"3.6"`. 10 | 11 | 12 | ## Example usage 13 | 14 | ``` 15 | ... 16 | ... 17 | strategy: 18 | matrix: 19 | mongodb-version: ["4.0", "4.2"] 20 | ... 21 | ... 22 | - name: Launch MongoDB 23 | uses: wbari/start-mongoDB@v0.2 24 | with: 25 | mongoDBVersion: ${{ matrix.mongodb-version }} 26 | ``` 27 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Start MongoDB As Docker' 2 | description: 'Starts MongoDB specific version in Background as a Docker container' 3 | inputs: 4 | mongoDBVersion: 5 | description: 'MongoDB Version' 6 | required: true 7 | default: '3.6' 8 | runs: 9 | using: 'node12' 10 | main: 'runMongoDBAsDocker.js' 11 | 12 | branding: 13 | icon: 'activity' 14 | color: 'blue' 15 | -------------------------------------------------------------------------------- /node_modules/@actions/core/README.md: -------------------------------------------------------------------------------- 1 | # `@actions/core` 2 | 3 | > Core functions for setting results, logging, registering secrets and exporting variables across actions 4 | 5 | ## Usage 6 | 7 | ### Import the package 8 | 9 | ```js 10 | // javascript 11 | const core = require('@actions/core'); 12 | 13 | // typescript 14 | import * as core from '@actions/core'; 15 | ``` 16 | 17 | #### Inputs/Outputs 18 | 19 | Action inputs can be read with `getInput`. Outputs can be set with `setOutput` which makes them available to be mapped into inputs of other actions to ensure they are decoupled. 20 | 21 | ```js 22 | const myInput = core.getInput('inputName', { required: true }); 23 | 24 | core.setOutput('outputKey', 'outputVal'); 25 | ``` 26 | 27 | #### Exporting variables 28 | 29 | Since each step runs in a separate process, you can use `exportVariable` to add it to this step and future steps environment blocks. 30 | 31 | ```js 32 | core.exportVariable('envVar', 'Val'); 33 | ``` 34 | 35 | #### Setting a secret 36 | 37 | Setting a secret registers the secret with the runner to ensure it is masked in logs. 38 | 39 | ```js 40 | core.setSecret('myPassword'); 41 | ``` 42 | 43 | #### PATH Manipulation 44 | 45 | To make a tool's path available in the path for the remainder of the job (without altering the machine or containers state), use `addPath`. The runner will prepend the path given to the jobs PATH. 46 | 47 | ```js 48 | core.addPath('/path/to/mytool'); 49 | ``` 50 | 51 | #### Exit codes 52 | 53 | You should use this library to set the failing exit code for your action. If status is not set and the script runs to completion, that will lead to a success. 54 | 55 | ```js 56 | const core = require('@actions/core'); 57 | 58 | try { 59 | // Do stuff 60 | } 61 | catch (err) { 62 | // setFailed logs the message and sets a failing exit code 63 | core.setFailed(`Action failed with error ${err}`); 64 | } 65 | 66 | Note that `setNeutral` is not yet implemented in actions V2 but equivalent functionality is being planned. 67 | 68 | ``` 69 | 70 | #### Logging 71 | 72 | Finally, this library provides some utilities for logging. Note that debug logging is hidden from the logs by default. This behavior can be toggled by enabling the [Step Debug Logs](../../docs/action-debugging.md#step-debug-logs). 73 | 74 | ```js 75 | const core = require('@actions/core'); 76 | 77 | const myInput = core.getInput('input'); 78 | try { 79 | core.debug('Inside try block'); 80 | 81 | if (!myInput) { 82 | core.warning('myInput was not set'); 83 | } 84 | 85 | // Do stuff 86 | } 87 | catch (err) { 88 | core.error(`Error ${err}, action may still succeed though`); 89 | } 90 | ``` 91 | 92 | This library can also wrap chunks of output in foldable groups. 93 | 94 | ```js 95 | const core = require('@actions/core') 96 | 97 | // Manually wrap output 98 | core.startGroup('Do some function') 99 | doSomeFunction() 100 | core.endGroup() 101 | 102 | // Wrap an asynchronous function call 103 | const result = await core.group('Do something async', async () => { 104 | const response = await doSomeHTTPRequest() 105 | return response 106 | }) 107 | ``` -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/command.d.ts: -------------------------------------------------------------------------------- 1 | interface CommandProperties { 2 | [key: string]: string; 3 | } 4 | /** 5 | * Commands 6 | * 7 | * Command Format: 8 | * ##[name key=value;key=value]message 9 | * 10 | * Examples: 11 | * ##[warning]This is the user warning message 12 | * ##[set-secret name=mypassword]definitelyNotAPassword! 13 | */ 14 | export declare function issueCommand(command: string, properties: CommandProperties, message: string): void; 15 | export declare function issue(name: string, message?: string): void; 16 | export {}; 17 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/command.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | const os = require("os"); 4 | /** 5 | * Commands 6 | * 7 | * Command Format: 8 | * ##[name key=value;key=value]message 9 | * 10 | * Examples: 11 | * ##[warning]This is the user warning message 12 | * ##[set-secret name=mypassword]definitelyNotAPassword! 13 | */ 14 | function issueCommand(command, properties, message) { 15 | const cmd = new Command(command, properties, message); 16 | process.stdout.write(cmd.toString() + os.EOL); 17 | } 18 | exports.issueCommand = issueCommand; 19 | function issue(name, message = '') { 20 | issueCommand(name, {}, message); 21 | } 22 | exports.issue = issue; 23 | const CMD_STRING = '::'; 24 | class Command { 25 | constructor(command, properties, message) { 26 | if (!command) { 27 | command = 'missing.command'; 28 | } 29 | this.command = command; 30 | this.properties = properties; 31 | this.message = message; 32 | } 33 | toString() { 34 | let cmdStr = CMD_STRING + this.command; 35 | if (this.properties && Object.keys(this.properties).length > 0) { 36 | cmdStr += ' '; 37 | for (const key in this.properties) { 38 | if (this.properties.hasOwnProperty(key)) { 39 | const val = this.properties[key]; 40 | if (val) { 41 | // safely append the val - avoid blowing up when attempting to 42 | // call .replace() if message is not a string for some reason 43 | cmdStr += `${key}=${escape(`${val || ''}`)},`; 44 | } 45 | } 46 | } 47 | } 48 | cmdStr += CMD_STRING; 49 | // safely append the message - avoid blowing up when attempting to 50 | // call .replace() if message is not a string for some reason 51 | const message = `${this.message || ''}`; 52 | cmdStr += escapeData(message); 53 | return cmdStr; 54 | } 55 | } 56 | function escapeData(s) { 57 | return s.replace(/\r/g, '%0D').replace(/\n/g, '%0A'); 58 | } 59 | function escape(s) { 60 | return s 61 | .replace(/\r/g, '%0D') 62 | .replace(/\n/g, '%0A') 63 | .replace(/]/g, '%5D') 64 | .replace(/;/g, '%3B'); 65 | } 66 | //# sourceMappingURL=command.js.map -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/command.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;AAAA,yBAAwB;AAQxB;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAe;IAEf,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IACrD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AAC/C,CAAC;AAPD,oCAOC;AAED,SAAgB,KAAK,CAAC,IAAY,E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CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AACtD,CAAC;AAED,SAAS,MAAM,CAAC,CAAS;IACvB,OAAO,CAAC;SACL,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"} -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/core.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Interface for getInput options 3 | */ 4 | export interface InputOptions { 5 | /** Optional. Whether the input is required. If required and not present, will throw. Defaults to false */ 6 | required?: boolean; 7 | } 8 | /** 9 | * The code to exit an action 10 | */ 11 | export declare enum ExitCode { 12 | /** 13 | * A code indicating that the action was successful 14 | */ 15 | Success = 0, 16 | /** 17 | * A code indicating that the action was a failure 18 | */ 19 | Failure = 1 20 | } 21 | /** 22 | * Sets env variable for this action and future actions in the job 23 | * @param name the name of the variable to set 24 | * @param val the value of the variable 25 | */ 26 | export declare function exportVariable(name: string, val: string): void; 27 | /** 28 | * Registers a secret which will get masked from logs 29 | * @param secret value of the secret 30 | */ 31 | export declare function setSecret(secret: string): void; 32 | /** 33 | * Prepends inputPath to the PATH (for this action and future actions) 34 | * @param inputPath 35 | */ 36 | export declare function addPath(inputPath: string): void; 37 | /** 38 | * Gets the value of an input. The value is also trimmed. 39 | * 40 | * @param name name of the input to get 41 | * @param options optional. See InputOptions. 42 | * @returns string 43 | */ 44 | export declare function getInput(name: string, options?: InputOptions): string; 45 | /** 46 | * Sets the value of an output. 47 | * 48 | * @param name name of the output to set 49 | * @param value value to store 50 | */ 51 | export declare function setOutput(name: string, value: string): void; 52 | /** 53 | * Sets the action status to failed. 54 | * When the action exits it will be with an exit code of 1 55 | * @param message add error issue message 56 | */ 57 | export declare function setFailed(message: string): void; 58 | /** 59 | * Writes debug message to user log 60 | * @param message debug message 61 | */ 62 | export declare function debug(message: string): void; 63 | /** 64 | * Adds an error issue 65 | * @param message error issue message 66 | */ 67 | export declare function error(message: string): void; 68 | /** 69 | * Adds an warning issue 70 | * @param message warning issue message 71 | */ 72 | export declare function warning(message: string): void; 73 | /** 74 | * Writes info to log with console.log. 75 | * @param message info message 76 | */ 77 | export declare function info(message: string): void; 78 | /** 79 | * Begin an output group. 80 | * 81 | * Output until the next `groupEnd` will be foldable in this group 82 | * 83 | * @param name The name of the output group 84 | */ 85 | export declare function startGroup(name: string): void; 86 | /** 87 | * End an output group. 88 | */ 89 | export declare function endGroup(): void; 90 | /** 91 | * Wrap an asynchronous function call in a group. 92 | * 93 | * Returns the same type as the function itself. 94 | * 95 | * @param name The name of the group 96 | * @param fn The function to wrap in the group 97 | */ 98 | export declare function group(name: string, fn: () => Promise): Promise; 99 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/core.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | const command_1 = require("./command"); 13 | const os = require("os"); 14 | const path = require("path"); 15 | /** 16 | * The code to exit an action 17 | */ 18 | var ExitCode; 19 | (function (ExitCode) { 20 | /** 21 | * A code indicating that the action was successful 22 | */ 23 | ExitCode[ExitCode["Success"] = 0] = "Success"; 24 | /** 25 | * A code indicating that the action was a failure 26 | */ 27 | ExitCode[ExitCode["Failure"] = 1] = "Failure"; 28 | })(ExitCode = exports.ExitCode || (exports.ExitCode = {})); 29 | //----------------------------------------------------------------------- 30 | // Variables 31 | //----------------------------------------------------------------------- 32 | /** 33 | * Sets env variable for this action and future actions in the job 34 | * @param name the name of the variable to set 35 | * @param val the value of the variable 36 | */ 37 | function exportVariable(name, val) { 38 | process.env[name] = val; 39 | command_1.issueCommand('set-env', { name }, val); 40 | } 41 | exports.exportVariable = exportVariable; 42 | /** 43 | * Registers a secret which will get masked from logs 44 | * @param secret value of the secret 45 | */ 46 | function setSecret(secret) { 47 | command_1.issueCommand('add-mask', {}, secret); 48 | } 49 | exports.setSecret = setSecret; 50 | /** 51 | * Prepends inputPath to the PATH (for this action and future actions) 52 | * @param inputPath 53 | */ 54 | function addPath(inputPath) { 55 | command_1.issueCommand('add-path', {}, inputPath); 56 | process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; 57 | } 58 | exports.addPath = addPath; 59 | /** 60 | * Gets the value of an input. The value is also trimmed. 61 | * 62 | * @param name name of the input to get 63 | * @param options optional. See InputOptions. 64 | * @returns string 65 | */ 66 | function getInput(name, options) { 67 | const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; 68 | if (options && options.required && !val) { 69 | throw new Error(`Input required and not supplied: ${name}`); 70 | } 71 | return val.trim(); 72 | } 73 | exports.getInput = getInput; 74 | /** 75 | * Sets the value of an output. 76 | * 77 | * @param name name of the output to set 78 | * @param value value to store 79 | */ 80 | function setOutput(name, value) { 81 | command_1.issueCommand('set-output', { name }, value); 82 | } 83 | exports.setOutput = setOutput; 84 | //----------------------------------------------------------------------- 85 | // Results 86 | //----------------------------------------------------------------------- 87 | /** 88 | * Sets the action status to failed. 89 | * When the action exits it will be with an exit code of 1 90 | * @param message add error issue message 91 | */ 92 | function setFailed(message) { 93 | process.exitCode = ExitCode.Failure; 94 | error(message); 95 | } 96 | exports.setFailed = setFailed; 97 | //----------------------------------------------------------------------- 98 | // Logging Commands 99 | //----------------------------------------------------------------------- 100 | /** 101 | * Writes debug message to user log 102 | * @param message debug message 103 | */ 104 | function debug(message) { 105 | command_1.issueCommand('debug', {}, message); 106 | } 107 | exports.debug = debug; 108 | /** 109 | * Adds an error issue 110 | * @param message error issue message 111 | */ 112 | function error(message) { 113 | command_1.issue('error', message); 114 | } 115 | exports.error = error; 116 | /** 117 | * Adds an warning issue 118 | * @param message warning issue message 119 | */ 120 | function warning(message) { 121 | command_1.issue('warning', message); 122 | } 123 | exports.warning = warning; 124 | /** 125 | * Writes info to log with console.log. 126 | * @param message info message 127 | */ 128 | function info(message) { 129 | process.stdout.write(message + os.EOL); 130 | } 131 | exports.info = info; 132 | /** 133 | * Begin an output group. 134 | * 135 | * Output until the next `groupEnd` will be foldable in this group 136 | * 137 | * @param name The name of the output group 138 | */ 139 | function startGroup(name) { 140 | command_1.issue('group', name); 141 | } 142 | exports.startGroup = startGroup; 143 | /** 144 | * End an output group. 145 | */ 146 | function endGroup() { 147 | command_1.issue('endgroup'); 148 | } 149 | exports.endGroup = endGroup; 150 | /** 151 | * Wrap an asynchronous function call in a group. 152 | * 153 | * Returns the same type as the function itself. 154 | * 155 | * @param name The name of the group 156 | * @param fn The function to wrap in the group 157 | */ 158 | function group(name, fn) { 159 | return __awaiter(this, void 0, void 0, function* () { 160 | startGroup(name); 161 | let result; 162 | try { 163 | result = yield fn(); 164 | } 165 | finally { 166 | endGroup(); 167 | } 168 | return result; 169 | }); 170 | } 171 | exports.group = group; 172 | //# sourceMappingURL=core.js.map -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/core.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,uCAA6C;AAE7C,yBAAwB;AACxB,6BAA4B;AAU5B;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IAC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AAG,MAAM,EAAE,EAAE,CAAA;SACpB;gBAAS;YACR,QAAQ,EAAE,CAAA;SACX;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CAAA;AAZD,sBAYC"} -------------------------------------------------------------------------------- /node_modules/@actions/core/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "@actions/core", 3 | "_id": "@actions/core@1.1.3", 4 | "_inBundle": false, 5 | "_integrity": "sha512-2BIib53Jh4Cfm+1XNuZYYGTeRo8yiWEAUMoliMh1qQGMaqTF4VUlhhcsBylTu4qWmUx45DrY0y0XskimAHSqhw==", 6 | "_location": "/@actions/core", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "tag", 10 | "registry": true, 11 | "raw": "@actions/core", 12 | "name": "@actions/core", 13 | "escapedName": "@actions%2fcore", 14 | "scope": "@actions", 15 | "rawSpec": "", 16 | "saveSpec": null, 17 | "fetchSpec": "latest" 18 | }, 19 | "_requiredBy": [ 20 | "#USER", 21 | "/" 22 | ], 23 | "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.1.3.tgz", 24 | "_shasum": "543b0e7ca0e53dccc5dca4811a4fac59c1b35f5c", 25 | "_spec": "@actions/core", 26 | "_where": "/home/wasim/startMongoDBDocker", 27 | "bugs": { 28 | "url": "https://github.com/actions/toolkit/issues" 29 | }, 30 | "bundleDependencies": false, 31 | "deprecated": false, 32 | "description": "Actions core lib", 33 | "devDependencies": { 34 | "@types/node": "^12.0.2" 35 | }, 36 | "directories": { 37 | "lib": "lib", 38 | "test": "__tests__" 39 | }, 40 | "files": [ 41 | "lib" 42 | ], 43 | "homepage": "https://github.com/actions/toolkit/tree/master/packages/core", 44 | "keywords": [ 45 | "github", 46 | "actions", 47 | "core" 48 | ], 49 | "license": "MIT", 50 | "main": "lib/core.js", 51 | "name": "@actions/core", 52 | "publishConfig": { 53 | "access": "public" 54 | }, 55 | "repository": { 56 | "type": "git", 57 | "url": "git+https://github.com/actions/toolkit.git", 58 | "directory": "packages/core" 59 | }, 60 | "scripts": { 61 | "test": "echo \"Error: run tests from root\" && exit 1", 62 | "tsc": "tsc" 63 | }, 64 | "version": "1.1.3" 65 | } 66 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright 2019 GitHub 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/@actions/exec/README.md: -------------------------------------------------------------------------------- 1 | # `@actions/exec` 2 | 3 | ## Usage 4 | 5 | #### Basic 6 | 7 | You can use this package to execute your tools on the command line in a cross platform way: 8 | 9 | ```js 10 | const exec = require('@actions/exec'); 11 | 12 | await exec.exec('node index.js'); 13 | ``` 14 | 15 | #### Args 16 | 17 | You can also pass in arg arrays: 18 | 19 | ```js 20 | const exec = require('@actions/exec'); 21 | 22 | await exec.exec('node', ['index.js', 'foo=bar']); 23 | ``` 24 | 25 | #### Output/options 26 | 27 | Capture output or specify [other options](https://github.com/actions/toolkit/blob/d9347d4ab99fd507c0b9104b2cf79fb44fcc827d/packages/exec/src/interfaces.ts#L5): 28 | 29 | ```js 30 | const exec = require('@actions/exec'); 31 | 32 | let myOutput = ''; 33 | let myError = ''; 34 | 35 | const options = {}; 36 | options.listeners = { 37 | stdout: (data: Buffer) => { 38 | myOutput += data.toString(); 39 | }, 40 | stderr: (data: Buffer) => { 41 | myError += data.toString(); 42 | } 43 | }; 44 | options.cwd = './lib'; 45 | 46 | await exec.exec('node', ['index.js', 'foo=bar'], options); 47 | ``` 48 | 49 | #### Exec tools not in the PATH 50 | 51 | You can use it in conjunction with the `which` function from `@actions/io` to execute tools that are not in the PATH: 52 | 53 | ```js 54 | const exec = require('@actions/exec'); 55 | const io = require('@actions/io'); 56 | 57 | const pythonPath: string = await io.which('python', true) 58 | 59 | await exec.exec(`"${pythonPath}"`, ['main.py']); 60 | ``` 61 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/exec.d.ts: -------------------------------------------------------------------------------- 1 | import * as im from './interfaces'; 2 | /** 3 | * Exec a command. 4 | * Output will be streamed to the live console. 5 | * Returns promise with return code 6 | * 7 | * @param commandLine command to execute (can include additional args). Must be correctly escaped. 8 | * @param args optional arguments for tool. Escaping is handled by the lib. 9 | * @param options optional exec options. See ExecOptions 10 | * @returns Promise exit code 11 | */ 12 | export declare function exec(commandLine: string, args?: string[], options?: im.ExecOptions): Promise; 13 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/exec.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | const tr = require("./toolrunner"); 13 | /** 14 | * Exec a command. 15 | * Output will be streamed to the live console. 16 | * Returns promise with return code 17 | * 18 | * @param commandLine command to execute (can include additional args). Must be correctly escaped. 19 | * @param args optional arguments for tool. Escaping is handled by the lib. 20 | * @param options optional exec options. See ExecOptions 21 | * @returns Promise exit code 22 | */ 23 | function exec(commandLine, args, options) { 24 | return __awaiter(this, void 0, void 0, function* () { 25 | const commandArgs = tr.argStringToArray(commandLine); 26 | if (commandArgs.length === 0) { 27 | throw new Error(`Parameter 'commandLine' cannot be null or empty.`); 28 | } 29 | // Path to tool to execute should be first arg 30 | const toolPath = commandArgs[0]; 31 | args = commandArgs.slice(1).concat(args || []); 32 | const runner = new tr.ToolRunner(toolPath, args, options); 33 | return runner.exec(); 34 | }); 35 | } 36 | exports.exec = exec; 37 | //# sourceMappingURL=exec.js.map -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/exec.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"exec.js","sourceRoot":"","sources":["../src/exec.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,mCAAkC;AAElC;;;;;;;;;GASG;AACH,SAAsB,IAAI,CACxB,WAAmB,EACnB,IAAe,EACf,OAAwB;;QAExB,MAAM,WAAW,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAA;QACpD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;SACpE;QACD,8CAA8C;QAC9C,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAA;QAC/B,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;QAC9C,MAAM,MAAM,GAAkB,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QACxE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAA;IACtB,CAAC;CAAA;AAdD,oBAcC"} -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/interfaces.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as stream from 'stream'; 3 | /** 4 | * Interface for exec options 5 | */ 6 | export interface ExecOptions { 7 | /** optional working directory. defaults to current */ 8 | cwd?: string; 9 | /** optional envvar dictionary. defaults to current process's env */ 10 | env?: { 11 | [key: string]: string; 12 | }; 13 | /** optional. defaults to false */ 14 | silent?: boolean; 15 | /** optional out stream to use. Defaults to process.stdout */ 16 | outStream?: stream.Writable; 17 | /** optional err stream to use. Defaults to process.stderr */ 18 | errStream?: stream.Writable; 19 | /** optional. whether to skip quoting/escaping arguments if needed. defaults to false. */ 20 | windowsVerbatimArguments?: boolean; 21 | /** optional. whether to fail if output to stderr. defaults to false */ 22 | failOnStdErr?: boolean; 23 | /** optional. defaults to failing on non zero. ignore will not fail leaving it up to the caller */ 24 | ignoreReturnCode?: boolean; 25 | /** optional. How long in ms to wait for STDIO streams to close after the exit event of the process before terminating. defaults to 10000 */ 26 | delay?: number; 27 | /** optional. Listeners for output. Callback functions that will be called on these events */ 28 | listeners?: { 29 | stdout?: (data: Buffer) => void; 30 | stderr?: (data: Buffer) => void; 31 | stdline?: (data: string) => void; 32 | errline?: (data: string) => void; 33 | debug?: (data: string) => void; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/interfaces.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | //# sourceMappingURL=interfaces.js.map -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/interfaces.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/toolrunner.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as events from 'events'; 3 | import * as im from './interfaces'; 4 | export declare class ToolRunner extends events.EventEmitter { 5 | constructor(toolPath: string, args?: string[], options?: im.ExecOptions); 6 | private toolPath; 7 | private args; 8 | private options; 9 | private _debug; 10 | private _getCommandString; 11 | private _processLineBuffer; 12 | private _getSpawnFileName; 13 | private _getSpawnArgs; 14 | private _endsWith; 15 | private _isCmdFile; 16 | private _windowsQuoteCmdArg; 17 | private _uvQuoteCmdArg; 18 | private _cloneExecOptions; 19 | private _getSpawnOptions; 20 | /** 21 | * Exec a tool. 22 | * Output will be streamed to the live console. 23 | * Returns promise with return code 24 | * 25 | * @param tool path to tool to exec 26 | * @param options optional exec options. See ExecOptions 27 | * @returns number 28 | */ 29 | exec(): Promise; 30 | } 31 | /** 32 | * Convert an arg string to an array of args. Handles escaping 33 | * 34 | * @param argString string of arguments 35 | * @returns string[] array of arguments 36 | */ 37 | export declare function argStringToArray(argString: string): string[]; 38 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/toolrunner.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | const os = require("os"); 13 | const events = require("events"); 14 | const child = require("child_process"); 15 | /* eslint-disable @typescript-eslint/unbound-method */ 16 | const IS_WINDOWS = process.platform === 'win32'; 17 | /* 18 | * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. 19 | */ 20 | class ToolRunner extends events.EventEmitter { 21 | constructor(toolPath, args, options) { 22 | super(); 23 | if (!toolPath) { 24 | throw new Error("Parameter 'toolPath' cannot be null or empty."); 25 | } 26 | this.toolPath = toolPath; 27 | this.args = args || []; 28 | this.options = options || {}; 29 | } 30 | _debug(message) { 31 | if (this.options.listeners && this.options.listeners.debug) { 32 | this.options.listeners.debug(message); 33 | } 34 | } 35 | _getCommandString(options, noPrefix) { 36 | const toolPath = this._getSpawnFileName(); 37 | const args = this._getSpawnArgs(options); 38 | let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool 39 | if (IS_WINDOWS) { 40 | // Windows + cmd file 41 | if (this._isCmdFile()) { 42 | cmd += toolPath; 43 | for (const a of args) { 44 | cmd += ` ${a}`; 45 | } 46 | } 47 | // Windows + verbatim 48 | else if (options.windowsVerbatimArguments) { 49 | cmd += `"${toolPath}"`; 50 | for (const a of args) { 51 | cmd += ` ${a}`; 52 | } 53 | } 54 | // Windows (regular) 55 | else { 56 | cmd += this._windowsQuoteCmdArg(toolPath); 57 | for (const a of args) { 58 | cmd += ` ${this._windowsQuoteCmdArg(a)}`; 59 | } 60 | } 61 | } 62 | else { 63 | // OSX/Linux - this can likely be improved with some form of quoting. 64 | // creating processes on Unix is fundamentally different than Windows. 65 | // on Unix, execvp() takes an arg array. 66 | cmd += toolPath; 67 | for (const a of args) { 68 | cmd += ` ${a}`; 69 | } 70 | } 71 | return cmd; 72 | } 73 | _processLineBuffer(data, strBuffer, onLine) { 74 | try { 75 | let s = strBuffer + data.toString(); 76 | let n = s.indexOf(os.EOL); 77 | while (n > -1) { 78 | const line = s.substring(0, n); 79 | onLine(line); 80 | // the rest of the string ... 81 | s = s.substring(n + os.EOL.length); 82 | n = s.indexOf(os.EOL); 83 | } 84 | strBuffer = s; 85 | } 86 | catch (err) { 87 | // streaming lines to console is best effort. Don't fail a build. 88 | this._debug(`error processing line. Failed with error ${err}`); 89 | } 90 | } 91 | _getSpawnFileName() { 92 | if (IS_WINDOWS) { 93 | if (this._isCmdFile()) { 94 | return process.env['COMSPEC'] || 'cmd.exe'; 95 | } 96 | } 97 | return this.toolPath; 98 | } 99 | _getSpawnArgs(options) { 100 | if (IS_WINDOWS) { 101 | if (this._isCmdFile()) { 102 | let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; 103 | for (const a of this.args) { 104 | argline += ' '; 105 | argline += options.windowsVerbatimArguments 106 | ? a 107 | : this._windowsQuoteCmdArg(a); 108 | } 109 | argline += '"'; 110 | return [argline]; 111 | } 112 | } 113 | return this.args; 114 | } 115 | _endsWith(str, end) { 116 | return str.endsWith(end); 117 | } 118 | _isCmdFile() { 119 | const upperToolPath = this.toolPath.toUpperCase(); 120 | return (this._endsWith(upperToolPath, '.CMD') || 121 | this._endsWith(upperToolPath, '.BAT')); 122 | } 123 | _windowsQuoteCmdArg(arg) { 124 | // for .exe, apply the normal quoting rules that libuv applies 125 | if (!this._isCmdFile()) { 126 | return this._uvQuoteCmdArg(arg); 127 | } 128 | // otherwise apply quoting rules specific to the cmd.exe command line parser. 129 | // the libuv rules are generic and are not designed specifically for cmd.exe 130 | // command line parser. 131 | // 132 | // for a detailed description of the cmd.exe command line parser, refer to 133 | // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 134 | // need quotes for empty arg 135 | if (!arg) { 136 | return '""'; 137 | } 138 | // determine whether the arg needs to be quoted 139 | const cmdSpecialChars = [ 140 | ' ', 141 | '\t', 142 | '&', 143 | '(', 144 | ')', 145 | '[', 146 | ']', 147 | '{', 148 | '}', 149 | '^', 150 | '=', 151 | ';', 152 | '!', 153 | "'", 154 | '+', 155 | ',', 156 | '`', 157 | '~', 158 | '|', 159 | '<', 160 | '>', 161 | '"' 162 | ]; 163 | let needsQuotes = false; 164 | for (const char of arg) { 165 | if (cmdSpecialChars.some(x => x === char)) { 166 | needsQuotes = true; 167 | break; 168 | } 169 | } 170 | // short-circuit if quotes not needed 171 | if (!needsQuotes) { 172 | return arg; 173 | } 174 | // the following quoting rules are very similar to the rules that by libuv applies. 175 | // 176 | // 1) wrap the string in quotes 177 | // 178 | // 2) double-up quotes - i.e. " => "" 179 | // 180 | // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately 181 | // doesn't work well with a cmd.exe command line. 182 | // 183 | // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. 184 | // for example, the command line: 185 | // foo.exe "myarg:""my val""" 186 | // is parsed by a .NET console app into an arg array: 187 | // [ "myarg:\"my val\"" ] 188 | // which is the same end result when applying libuv quoting rules. although the actual 189 | // command line from libuv quoting rules would look like: 190 | // foo.exe "myarg:\"my val\"" 191 | // 192 | // 3) double-up slashes that precede a quote, 193 | // e.g. hello \world => "hello \world" 194 | // hello\"world => "hello\\""world" 195 | // hello\\"world => "hello\\\\""world" 196 | // hello world\ => "hello world\\" 197 | // 198 | // technically this is not required for a cmd.exe command line, or the batch argument parser. 199 | // the reasons for including this as a .cmd quoting rule are: 200 | // 201 | // a) this is optimized for the scenario where the argument is passed from the .cmd file to an 202 | // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. 203 | // 204 | // b) it's what we've been doing previously (by deferring to node default behavior) and we 205 | // haven't heard any complaints about that aspect. 206 | // 207 | // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be 208 | // escaped when used on the command line directly - even though within a .cmd file % can be escaped 209 | // by using %%. 210 | // 211 | // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts 212 | // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. 213 | // 214 | // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would 215 | // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the 216 | // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args 217 | // to an external program. 218 | // 219 | // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. 220 | // % can be escaped within a .cmd file. 221 | let reverse = '"'; 222 | let quoteHit = true; 223 | for (let i = arg.length; i > 0; i--) { 224 | // walk the string in reverse 225 | reverse += arg[i - 1]; 226 | if (quoteHit && arg[i - 1] === '\\') { 227 | reverse += '\\'; // double the slash 228 | } 229 | else if (arg[i - 1] === '"') { 230 | quoteHit = true; 231 | reverse += '"'; // double the quote 232 | } 233 | else { 234 | quoteHit = false; 235 | } 236 | } 237 | reverse += '"'; 238 | return reverse 239 | .split('') 240 | .reverse() 241 | .join(''); 242 | } 243 | _uvQuoteCmdArg(arg) { 244 | // Tool runner wraps child_process.spawn() and needs to apply the same quoting as 245 | // Node in certain cases where the undocumented spawn option windowsVerbatimArguments 246 | // is used. 247 | // 248 | // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, 249 | // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), 250 | // pasting copyright notice from Node within this function: 251 | // 252 | // Copyright Joyent, Inc. and other Node contributors. All rights reserved. 253 | // 254 | // Permission is hereby granted, free of charge, to any person obtaining a copy 255 | // of this software and associated documentation files (the "Software"), to 256 | // deal in the Software without restriction, including without limitation the 257 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 258 | // sell copies of the Software, and to permit persons to whom the Software is 259 | // furnished to do so, subject to the following conditions: 260 | // 261 | // The above copyright notice and this permission notice shall be included in 262 | // all copies or substantial portions of the Software. 263 | // 264 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 265 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 266 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 267 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 268 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 269 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 270 | // IN THE SOFTWARE. 271 | if (!arg) { 272 | // Need double quotation for empty argument 273 | return '""'; 274 | } 275 | if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) { 276 | // No quotation needed 277 | return arg; 278 | } 279 | if (!arg.includes('"') && !arg.includes('\\')) { 280 | // No embedded double quotes or backslashes, so I can just wrap 281 | // quote marks around the whole thing. 282 | return `"${arg}"`; 283 | } 284 | // Expected input/output: 285 | // input : hello"world 286 | // output: "hello\"world" 287 | // input : hello""world 288 | // output: "hello\"\"world" 289 | // input : hello\world 290 | // output: hello\world 291 | // input : hello\\world 292 | // output: hello\\world 293 | // input : hello\"world 294 | // output: "hello\\\"world" 295 | // input : hello\\"world 296 | // output: "hello\\\\\"world" 297 | // input : hello world\ 298 | // output: "hello world\\" - note the comment in libuv actually reads "hello world\" 299 | // but it appears the comment is wrong, it should be "hello world\\" 300 | let reverse = '"'; 301 | let quoteHit = true; 302 | for (let i = arg.length; i > 0; i--) { 303 | // walk the string in reverse 304 | reverse += arg[i - 1]; 305 | if (quoteHit && arg[i - 1] === '\\') { 306 | reverse += '\\'; 307 | } 308 | else if (arg[i - 1] === '"') { 309 | quoteHit = true; 310 | reverse += '\\'; 311 | } 312 | else { 313 | quoteHit = false; 314 | } 315 | } 316 | reverse += '"'; 317 | return reverse 318 | .split('') 319 | .reverse() 320 | .join(''); 321 | } 322 | _cloneExecOptions(options) { 323 | options = options || {}; 324 | const result = { 325 | cwd: options.cwd || process.cwd(), 326 | env: options.env || process.env, 327 | silent: options.silent || false, 328 | windowsVerbatimArguments: options.windowsVerbatimArguments || false, 329 | failOnStdErr: options.failOnStdErr || false, 330 | ignoreReturnCode: options.ignoreReturnCode || false, 331 | delay: options.delay || 10000 332 | }; 333 | result.outStream = options.outStream || process.stdout; 334 | result.errStream = options.errStream || process.stderr; 335 | return result; 336 | } 337 | _getSpawnOptions(options, toolPath) { 338 | options = options || {}; 339 | const result = {}; 340 | result.cwd = options.cwd; 341 | result.env = options.env; 342 | result['windowsVerbatimArguments'] = 343 | options.windowsVerbatimArguments || this._isCmdFile(); 344 | if (options.windowsVerbatimArguments) { 345 | result.argv0 = `"${toolPath}"`; 346 | } 347 | return result; 348 | } 349 | /** 350 | * Exec a tool. 351 | * Output will be streamed to the live console. 352 | * Returns promise with return code 353 | * 354 | * @param tool path to tool to exec 355 | * @param options optional exec options. See ExecOptions 356 | * @returns number 357 | */ 358 | exec() { 359 | return __awaiter(this, void 0, void 0, function* () { 360 | return new Promise((resolve, reject) => { 361 | this._debug(`exec tool: ${this.toolPath}`); 362 | this._debug('arguments:'); 363 | for (const arg of this.args) { 364 | this._debug(` ${arg}`); 365 | } 366 | const optionsNonNull = this._cloneExecOptions(this.options); 367 | if (!optionsNonNull.silent && optionsNonNull.outStream) { 368 | optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); 369 | } 370 | const state = new ExecState(optionsNonNull, this.toolPath); 371 | state.on('debug', (message) => { 372 | this._debug(message); 373 | }); 374 | const fileName = this._getSpawnFileName(); 375 | const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); 376 | const stdbuffer = ''; 377 | if (cp.stdout) { 378 | cp.stdout.on('data', (data) => { 379 | if (this.options.listeners && this.options.listeners.stdout) { 380 | this.options.listeners.stdout(data); 381 | } 382 | if (!optionsNonNull.silent && optionsNonNull.outStream) { 383 | optionsNonNull.outStream.write(data); 384 | } 385 | this._processLineBuffer(data, stdbuffer, (line) => { 386 | if (this.options.listeners && this.options.listeners.stdline) { 387 | this.options.listeners.stdline(line); 388 | } 389 | }); 390 | }); 391 | } 392 | const errbuffer = ''; 393 | if (cp.stderr) { 394 | cp.stderr.on('data', (data) => { 395 | state.processStderr = true; 396 | if (this.options.listeners && this.options.listeners.stderr) { 397 | this.options.listeners.stderr(data); 398 | } 399 | if (!optionsNonNull.silent && 400 | optionsNonNull.errStream && 401 | optionsNonNull.outStream) { 402 | const s = optionsNonNull.failOnStdErr 403 | ? optionsNonNull.errStream 404 | : optionsNonNull.outStream; 405 | s.write(data); 406 | } 407 | this._processLineBuffer(data, errbuffer, (line) => { 408 | if (this.options.listeners && this.options.listeners.errline) { 409 | this.options.listeners.errline(line); 410 | } 411 | }); 412 | }); 413 | } 414 | cp.on('error', (err) => { 415 | state.processError = err.message; 416 | state.processExited = true; 417 | state.processClosed = true; 418 | state.CheckComplete(); 419 | }); 420 | cp.on('exit', (code) => { 421 | state.processExitCode = code; 422 | state.processExited = true; 423 | this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); 424 | state.CheckComplete(); 425 | }); 426 | cp.on('close', (code) => { 427 | state.processExitCode = code; 428 | state.processExited = true; 429 | state.processClosed = true; 430 | this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); 431 | state.CheckComplete(); 432 | }); 433 | state.on('done', (error, exitCode) => { 434 | if (stdbuffer.length > 0) { 435 | this.emit('stdline', stdbuffer); 436 | } 437 | if (errbuffer.length > 0) { 438 | this.emit('errline', errbuffer); 439 | } 440 | cp.removeAllListeners(); 441 | if (error) { 442 | reject(error); 443 | } 444 | else { 445 | resolve(exitCode); 446 | } 447 | }); 448 | }); 449 | }); 450 | } 451 | } 452 | exports.ToolRunner = ToolRunner; 453 | /** 454 | * Convert an arg string to an array of args. Handles escaping 455 | * 456 | * @param argString string of arguments 457 | * @returns string[] array of arguments 458 | */ 459 | function argStringToArray(argString) { 460 | const args = []; 461 | let inQuotes = false; 462 | let escaped = false; 463 | let arg = ''; 464 | function append(c) { 465 | // we only escape double quotes. 466 | if (escaped && c !== '"') { 467 | arg += '\\'; 468 | } 469 | arg += c; 470 | escaped = false; 471 | } 472 | for (let i = 0; i < argString.length; i++) { 473 | const c = argString.charAt(i); 474 | if (c === '"') { 475 | if (!escaped) { 476 | inQuotes = !inQuotes; 477 | } 478 | else { 479 | append(c); 480 | } 481 | continue; 482 | } 483 | if (c === '\\' && escaped) { 484 | append(c); 485 | continue; 486 | } 487 | if (c === '\\' && inQuotes) { 488 | escaped = true; 489 | continue; 490 | } 491 | if (c === ' ' && !inQuotes) { 492 | if (arg.length > 0) { 493 | args.push(arg); 494 | arg = ''; 495 | } 496 | continue; 497 | } 498 | append(c); 499 | } 500 | if (arg.length > 0) { 501 | args.push(arg.trim()); 502 | } 503 | return args; 504 | } 505 | exports.argStringToArray = argStringToArray; 506 | class ExecState extends events.EventEmitter { 507 | constructor(options, toolPath) { 508 | super(); 509 | this.processClosed = false; // tracks whether the process has exited and stdio is closed 510 | this.processError = ''; 511 | this.processExitCode = 0; 512 | this.processExited = false; // tracks whether the process has exited 513 | this.processStderr = false; // tracks whether stderr was written to 514 | this.delay = 10000; // 10 seconds 515 | this.done = false; 516 | this.timeout = null; 517 | if (!toolPath) { 518 | throw new Error('toolPath must not be empty'); 519 | } 520 | this.options = options; 521 | this.toolPath = toolPath; 522 | if (options.delay) { 523 | this.delay = options.delay; 524 | } 525 | } 526 | CheckComplete() { 527 | if (this.done) { 528 | return; 529 | } 530 | if (this.processClosed) { 531 | this._setResult(); 532 | } 533 | else if (this.processExited) { 534 | this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this); 535 | } 536 | } 537 | _debug(message) { 538 | this.emit('debug', message); 539 | } 540 | _setResult() { 541 | // determine whether there is an error 542 | let error; 543 | if (this.processExited) { 544 | if (this.processError) { 545 | error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); 546 | } 547 | else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { 548 | error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); 549 | } 550 | else if (this.processStderr && this.options.failOnStdErr) { 551 | error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); 552 | } 553 | } 554 | // clear the timeout 555 | if (this.timeout) { 556 | clearTimeout(this.timeout); 557 | this.timeout = null; 558 | } 559 | this.done = true; 560 | this.emit('done', error, this.processExitCode); 561 | } 562 | static HandleTimeout(state) { 563 | if (state.done) { 564 | return; 565 | } 566 | if (!state.processClosed && state.processExited) { 567 | const message = `The STDIO streams did not close within ${state.delay / 568 | 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; 569 | state._debug(message); 570 | } 571 | state._setResult(); 572 | } 573 | } 574 | //# sourceMappingURL=toolrunner.js.map -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/toolrunner.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"toolrunner.js","sourceRoot":"","sources":["../src/toolrunner.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,yBAAwB;AACxB,iCAAgC;AAChC,uCAAsC;AAItC,sDAAsD;AAEtD,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAE/C;;GAEG;AACH,MAAa,UAAW,SAAQ,MAAM,CAAC,YAAY;IACjD,YAAY,QAAgB,EAAE,IAAe,EAAE,OAAwB;QACrE,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;SACjE;QAED,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;IAC9B,CAAC;IAMO,MAAM,CAAC,OAAe;QAC5B,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE;YAC1D,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;SACtC;IACH,CAAC;IAEO,iBAAiB,CACvB,OAAuB,EACvB,QAAkB;QAElB,MAAM,QAAQ,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAA;QACzC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QACxC,IAAI,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,CA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ACP,EAAE,CACH,CAAA;aACF;iBAAM,IAAI,IAAI,CAAC,eAAe,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE;gBACvE,KAAK,GAAG,IAAI,KAAK,CACf,gBAAgB,IAAI,CAAC,QAAQ,2BAC3B,IAAI,CAAC,eACP,EAAE,CACH,CAAA;aACF;iBAAM,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;gBAC1D,KAAK,GAAG,IAAI,KAAK,CACf,gBACE,IAAI,CAAC,QACP,sEAAsE,CACvE,CAAA;aACF;SACF;QAED,oBAAoB;QACpB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;SACpB;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,CAAA;IAChD,CAAC;IAEO,MAAM,CAAC,aAAa,CAAC,KAAgB;QAC3C,IAAI,KAAK,CAAC,IAAI,EAAE;YACd,OAAM;SACP;QAED,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,aAAa,EAAE;YAC/C,MAAM,OAAO,GAAG,0CAA0C,KAAK,CAAC,KAAK;gBACnE,IAAI,4CACJ,KAAK,CAAC,QACR,0FAA0F,CAAA;YAC1F,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;SACtB;QAED,KAAK,CAAC,UAAU,EAAE,CAAA;IACpB,CAAC;CACF"} -------------------------------------------------------------------------------- /node_modules/@actions/exec/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "@actions/exec", 3 | "_id": "@actions/exec@1.0.1", 4 | "_inBundle": false, 5 | "_integrity": "sha512-nvFkxwiicvpzNiCBF4wFBDfnBvi7xp/as7LE1hBxBxKG2L29+gkIPBiLKMVORL+Hg3JNf07AKRfl0V5djoypjQ==", 6 | "_location": "/@actions/exec", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "tag", 10 | "registry": true, 11 | "raw": "@actions/exec", 12 | "name": "@actions/exec", 13 | "escapedName": "@actions%2fexec", 14 | "scope": "@actions", 15 | "rawSpec": "", 16 | "saveSpec": null, 17 | "fetchSpec": "latest" 18 | }, 19 | "_requiredBy": [ 20 | "#USER", 21 | "/" 22 | ], 23 | "_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.1.tgz", 24 | "_shasum": "1624b541165697e7008d7c87bc1f69f191263c6c", 25 | "_spec": "@actions/exec", 26 | "_where": "/home/wasim/startMongoDBDocker", 27 | "bugs": { 28 | "url": "https://github.com/actions/toolkit/issues" 29 | }, 30 | "bundleDependencies": false, 31 | "deprecated": false, 32 | "description": "Actions exec lib", 33 | "devDependencies": { 34 | "@actions/io": "^1.0.1" 35 | }, 36 | "directories": { 37 | "lib": "lib", 38 | "test": "__tests__" 39 | }, 40 | "files": [ 41 | "lib" 42 | ], 43 | "gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52", 44 | "homepage": "https://github.com/actions/toolkit/tree/master/packages/exec", 45 | "keywords": [ 46 | "github", 47 | "actions", 48 | "exec" 49 | ], 50 | "license": "MIT", 51 | "main": "lib/exec.js", 52 | "name": "@actions/exec", 53 | "publishConfig": { 54 | "access": "public" 55 | }, 56 | "repository": { 57 | "type": "git", 58 | "url": "git+https://github.com/actions/toolkit.git" 59 | }, 60 | "scripts": { 61 | "test": "echo \"Error: run tests from root\" && exit 1", 62 | "tsc": "tsc" 63 | }, 64 | "version": "1.0.1" 65 | } 66 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "startMongoDBDocker", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@actions/core": { 8 | "version": "1.1.3", 9 | "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.1.3.tgz", 10 | "integrity": "sha512-2BIib53Jh4Cfm+1XNuZYYGTeRo8yiWEAUMoliMh1qQGMaqTF4VUlhhcsBylTu4qWmUx45DrY0y0XskimAHSqhw==" 11 | }, 12 | "@actions/exec": { 13 | "version": "1.0.1", 14 | "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.1.tgz", 15 | "integrity": "sha512-nvFkxwiicvpzNiCBF4wFBDfnBvi7xp/as7LE1hBxBxKG2L29+gkIPBiLKMVORL+Hg3JNf07AKRfl0V5djoypjQ==" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "startMongoDBDocker", 3 | "version": "1.0.0", 4 | "description": "Starts the specific version of MongoDB as a detach Docker", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/wbari/startMongoDBDocker.git" 12 | }, 13 | "keywords": [], 14 | "author": "", 15 | "license": "ISC", 16 | "bugs": { 17 | "url": "https://github.com/wbari/startMongoDBDocker/issues" 18 | }, 19 | "homepage": "https://github.com/wbari/startMongoDBDocker#readme", 20 | "dependencies": { 21 | "@actions/core": "^1.1.3", 22 | "@actions/exec": "^1.0.1" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /runMongoDBAsDocker.js: -------------------------------------------------------------------------------- 1 | const core = require('@actions/core'); 2 | const exec = require('@actions/exec'); 3 | 4 | (async function (){ 5 | await exec.exec(`sudo docker run --name mongo -d -p 27017:27017 mongo:${core.getInput('mongoDBVersion')}`); 6 | })() 7 | 8 | --------------------------------------------------------------------------------