From d79d64ef10c36c12a63de10ebeddbb74dbcea4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20HOUZ=C3=89?= Date: Mon, 4 Jan 2021 16:22:15 +0100 Subject: [PATCH] describe plan steps --- action.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index f9d418b..ffb6973 100644 --- a/action.yaml +++ b/action.yaml @@ -29,9 +29,11 @@ runs: shell: bash working-directory: ${{ inputs.working-directory }} run: | + echo "๐Ÿ—บ terraform plan -lock=false -var-file=${{ inputs.terraform-environment }}.tfvars" plan=$(terraform plan -lock=false -no-color -var-file=${{ inputs.terraform-environment }}.tfvars) title=$(echo -e "$plan" | grep -e '^Plan:' | sed -E 's|Plan:||') - # remove plan noise + + echo "๐Ÿงน remove plan noise" plan=$( echo -e "$plan" | \ tail -n +$( @@ -41,6 +43,7 @@ runs: ) ) + echo "๐ŸŽ wrap plan into HTML" message=$(printf "
Terraform plan: %s %s @@ -56,6 +59,7 @@ runs: message="${message//$'\n'/'%0A'}" message="${message//$'\r'/'%0D'}" + echo "๐Ÿ‘จโ€๐Ÿ’ป display plan" echo -e "$plan" echo "" echo ::set-output name=plan-details::"$message"