From a87797c2e64331fde167bd4b250392add328d0c7 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Fri, 3 Jun 2022 14:41:28 -0400 Subject: [PATCH] feat: add cdk_pre_installed input --- action.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index c059192..39f589e 100644 --- a/action.yml +++ b/action.yml @@ -6,6 +6,10 @@ inputs: description: 'AWS CDK stack name to execute.' default: '*' required: false + cdk_pre_installed: + description: 'Use the pre installed aws-cdk' + default: false + required: true cdk_version: description: 'AWS CDK version to install.' default: 'latest' @@ -28,10 +32,12 @@ runs: id: aws-cdk working-directory: ${{ inputs.working_dir }} run: | - if [[ "${{ inputs.cdk_version }}" == "latest" ]]; then - npm install -g aws-cdk - else - npm install -g "aws-cdk@${{ inputs.cdk_version }}" + if [[ "${{ inputs.cdk_pre_installed }}" == "false" ]]; then + if [[ "${{ inputs.cdk_version }}" == "latest" ]]; then + npm install -g aws-cdk + else + npm install -g "aws-cdk@${{ inputs.cdk_version }}" + fi fi cdk ${{ inputs.cdk_subcommand }} ${{ inputs.cdk_extra_args }} "${{ inputs.cdk_stack }}"