diff --git a/README.md b/README.md index 8641dacf..90b4a78a 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,13 @@ A GitHub action to create [Deployments](https://developer.github.com/v3/repos/de ## Action inputs -| name | description | -| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `initial_status` | (Optional) Initial status for the deployment. Must be one of the [accepted strings](https://developer.github.com/v3/repos/deployments/#create-a-deployment-status) | -| `token` | GitHub token | -| `target_url` | (Optional) The target URL. This should be the URL of the app once deployed | -| `description` | (Optional) A description to give the environment | +| name | description | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `initial_status` | (Optional) Initial status for the deployment. Must be one of the [accepted strings](https://developer.github.com/v3/repos/deployments/#create-a-deployment-status) | +| `token` | GitHub token | +| `target_url` | (Optional) The target URL. This should be the URL of the app once deployed | +| `description` | (Optional) A description to give the environment | +| `auto_merge` | (Optional - default is `false`) Whether to attempt to auto-merge the default branch into the branch that the action is running on if set to `"true"`. More details in the [GitHub deployments API](https://developer.github.com/v3/repos/deployments/#parameters-1). Warning - setting this to `"true"` has caused this action to [fail in some cases](https://github.com/chrnorm/deployment-action/issues/1) | ## Action outputs diff --git a/package-lock.json b/package-lock.json index 34ee8495..f03d7880 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1194,9 +1194,9 @@ } }, "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true, "optional": true }, @@ -2407,9 +2407,9 @@ "dev": true }, "handlebars": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", - "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.1.tgz", + "integrity": "sha512-C29UoFzHe9yM61lOsIlCE5/mQVGrnIOrOq7maQl76L7tYPCgC1og0Ajt6uWnX4ZTxBPnjw+CUvawphwCfJgUnA==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -5090,13 +5090,13 @@ "dev": true }, "uglify-js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", - "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", + "version": "3.6.7", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.7.tgz", + "integrity": "sha512-4sXQDzmdnoXiO+xvmTzQsfIiwrjUCSA95rSP4SEd8tDb51W2TiDOlL76Hl+Kw0Ie42PSItCW8/t6pBNCF2R48A==", "dev": true, "optional": true, "requires": { - "commander": "~2.20.0", + "commander": "~2.20.3", "source-map": "~0.6.1" } }, diff --git a/src/main.ts b/src/main.ts index f2eccea3..d2d1aa4b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -24,6 +24,11 @@ async function run() { (core.getInput("initial_status", { required: false }) as DeploymentState) || "pending"; + const autoMergeStringInput = core.getInput("auto_merge", { + required: false + }); + + const auto_merge: boolean = autoMergeStringInput === "true"; const client = new github.GitHub(token); @@ -34,6 +39,7 @@ async function run() { required_contexts: [], environment, transient_environment: true, + auto_merge, description });