From 3d28fc771b6fc273b36daeef9eef47680d595173 Mon Sep 17 00:00:00 2001 From: Louis Boudreau Date: Tue, 22 Feb 2022 09:08:11 -0500 Subject: [PATCH] Update action.yml --- action.yml | 7 ++++--- dist/index.js | 48 ------------------------------------------------ src/main.ts | 7 ------- 3 files changed, 4 insertions(+), 58 deletions(-) diff --git a/action.yml b/action.yml index ad582f4..bc950bb 100644 --- a/action.yml +++ b/action.yml @@ -4,13 +4,14 @@ author: 'l.boudreau@agendrix.com' inputs: token: required: true - description: "This should be a personal access token with access to your repository. Ex: ${{ secrets.GITHUB_TOKEN }}" + description: "This should be a personal access token with access to your repository" + default: ${{ github.token }} deployment_outcome: required: false description: > Outcome of the deployment(s). If you want the action to verify multiple deployments, you must stringify. - Accepted values are any values from DeploymentOutcome enum: https://github.com/agendrix/wait-for-ecs-service-deployment-action/blob/main/src/ecs/types.ts" - Ex: ${{ needs.deploy.deployment_outcome }} or ${{ toJSON([needs.deploy-1.deployment_outcome, needs.deploy-2.deployment_outcome]) }} + Accepted values are any values from DeploymentOutcome enum: https://github.com/agendrix/wait-for-ecs-service-deployment-action/blob/main/src/ecs/types.ts + Ex: ${{ need/s.deploy.deployment_outcome }} or ${{ toJSON([need/s.deploy-1.deployment_outcome, need/s.deploy-2.deployment_outcome]) }} outputs: conclusion: description: Conclusion of the current workflow run diff --git a/dist/index.js b/dist/index.js index 0d1ae04..ffa978b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -8108,47 +8108,6 @@ function wrappy (fn, cb) { } -/***/ }), - -/***/ 8372: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.validateRequiredInputs = void 0; -const core = __importStar(__nccwpck_require__(2186)); -/** - * Validate that all required inputs were provided - * If not, it will throw. - */ -function validateRequiredInputs(requiredInputs) { - for (const requiredInput of requiredInputs) { - core.getInput(requiredInput, { required: true }); - } -} -exports.validateRequiredInputs = validateRequiredInputs; - - /***/ }), /***/ 399: @@ -8189,7 +8148,6 @@ const core = __importStar(__nccwpck_require__(2186)); const github = __importStar(__nccwpck_require__(5438)); const auth_action_1 = __nccwpck_require__(20); const types_1 = __nccwpck_require__(5077); -const validateRequiredInputs_1 = __nccwpck_require__(8372); function getJobConclusions() { return __awaiter(this, void 0, void 0, function* () { const auth = auth_action_1.createActionAuth(); @@ -8216,12 +8174,6 @@ function hasSkippedDeployments() { function run() { return __awaiter(this, void 0, void 0, function* () { try { - validateRequiredInputs_1.validateRequiredInputs([ - "run_id", - "token", - "repository", - "repository_owner" - ]); const jobsConclusion = yield getJobConclusions(); let conclusion = ""; if (jobsConclusion.includes(types_1.JobConclusion.FAILURE)) { diff --git a/src/main.ts b/src/main.ts index 2a8dc3d..81bd6e8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,7 +6,6 @@ import { WorkflowRunConclusion, JobConclusion } from "./types"; -import { validateRequiredInputs } from "../helpers/action/validateRequiredInputs"; async function getJobConclusions() { const auth = createActionAuth(); @@ -36,12 +35,6 @@ function hasSkippedDeployments() { async function run(): Promise { try { - validateRequiredInputs([ - "run_id", - "token", - "repository", - "repository_owner" - ]); const jobsConclusion = await getJobConclusions(); let conclusion = ""; if (jobsConclusion.includes(JobConclusion.FAILURE)) {