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