From a65eaae13449480adda14a671544cdddab578c29 Mon Sep 17 00:00:00 2001 From: Marius Boden <91532935+m4s-b3n@users.noreply.github.com> Date: Thu, 9 Nov 2023 21:42:29 +0100 Subject: [PATCH] fix(plan): fix condition for executing plan step(#8) --- action.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 2a74ea8..99332b0 100644 --- a/action.yml +++ b/action.yml @@ -170,7 +170,8 @@ runs: if: >- ${{ ( inputs.plan == 'true' || - inputs.comment-pull-request == 'true' + ( inputs.comment-pull-request == 'true' && + github.event_name == 'pull_request' ) ) && steps.list.outputs.stdout != '' }} run: | @@ -254,7 +255,11 @@ runs: fi shell: bash - name: Destroy - if: ${{ inputs.destroy == 'true' && steps.list.outputs.stdout != '' }} + if: >- + ${{ + inputs.destroy == 'true' && + steps.list.outputs.stdout != '' + }} run: | terramate run \ ${{ inputs.terramate-args }} \