From ae672195340b1d50ea3477e6592a159068609dda Mon Sep 17 00:00:00 2001 From: vegardrs Date: Mon, 22 Jul 2024 14:27:17 +0200 Subject: [PATCH] destroy the test app name environment --- .github/workflows/destroy_infra.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/destroy_infra.yaml b/.github/workflows/destroy_infra.yaml index d08f3218..dd7bb745 100644 --- a/.github/workflows/destroy_infra.yaml +++ b/.github/workflows/destroy_infra.yaml @@ -1,6 +1,12 @@ name: Destroy Infrastructure Terraform on: + push: + branches: + - terraform-modules + paths: + - '.github/workflows/destroy_infra.yaml' + workflow_dispatch: inputs: workspace: @@ -59,7 +65,7 @@ jobs: - name: Select or create workspace id: select-or-create - run: terraform workspace select -or-create ${{ github.event.inputs.workspace }} + run: terraform workspace select -or-create ${{ github.event.inputs.workspace || 'dev' }} - name: Destroy infra id: destroy