From 26d9700b7c168ad98d9f2a6ac93023fd5a94f561 Mon Sep 17 00:00:00 2001 From: mikereiddigital Date: Fri, 20 Sep 2024 13:47:47 +0100 Subject: [PATCH 1/2] Triggers an "exit 1" of the workflow if no changes are found. This is to prevent the pushing of a commit that is behind the remote which will error. --- .github/workflows/format-code.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/format-code.yml b/.github/workflows/format-code.yml index 388d90f73..c93ac5fc9 100644 --- a/.github/workflows/format-code.yml +++ b/.github/workflows/format-code.yml @@ -67,6 +67,8 @@ jobs: changes=$(git diff --staged --name-only) if [ -z "$changes" ]; then echo "No changes detected." + echo "Exiting workflow using status 1 without reporting an error" + exit 1 else echo "Changes detected." echo "changes=true" >> $GITHUB_ENV From 748226fe4454a34e0fdf5bd10e724d916cf782ca Mon Sep 17 00:00:00 2001 From: mikereiddigital Date: Fri, 20 Sep 2024 13:58:19 +0100 Subject: [PATCH 2/2] Removes linter testing changes in this locals file that were brought over from the original PR. --- terraform/environments/sprinkler/locals.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terraform/environments/sprinkler/locals.tf b/terraform/environments/sprinkler/locals.tf index 4977c6e5a..5fce4293c 100644 --- a/terraform/environments/sprinkler/locals.tf +++ b/terraform/environments/sprinkler/locals.tf @@ -20,9 +20,9 @@ locals { ) - environment = "sandbox" + environment = "sandbox" vpc_name = var.networking[0].business-unit - subnet_set = var.networking[0].set + subnet_set = var.networking[0].set vpc_all = "${local.vpc_name}-${local.environment}" subnet_set_name = "${var.networking[0].business-unit}-${local.environment}-${var.networking[0].set}"