From 8dd224a1c84b5a07387fc73a34f1818a1da541f6 Mon Sep 17 00:00:00 2001 From: Hannah Smith <13995068+hannah38@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:19:40 +0000 Subject: [PATCH] only run tf format on pr (#1282) Co-authored-by: Louise Huyton --- vars/spinInfra.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vars/spinInfra.groovy b/vars/spinInfra.groovy index bfcabc247d..278ed7e462 100644 --- a/vars/spinInfra.groovy +++ b/vars/spinInfra.groovy @@ -103,7 +103,9 @@ def call(Map params) { sh "terraform --version" - checkTerraformFormat() + onPR { + checkTerraformFormat() + } sh """ terraform init -reconfigure \