From 10ddff77f1bed372a8aa1951eb9867e923f78f6a Mon Sep 17 00:00:00 2001 From: Matt Dean Date: Fri, 20 Jun 2025 08:53:50 +0100 Subject: [PATCH] [NRL-1473] Build artifacts before TF destroy of PR envs --- .github/workflows/pr-env-destroy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-env-destroy.yml b/.github/workflows/pr-env-destroy.yml index 42e5bab46..5528d05fc 100644 --- a/.github/workflows/pr-env-destroy.yml +++ b/.github/workflows/pr-env-destroy.yml @@ -4,6 +4,7 @@ run-name: "Destroy PR Environment - #${{ github.event.pull_request.number }} (${ on: pull_request: types: [closed] + workflow_dispatch: concurrency: group: environment-${{ github.event.pull_request.number }} @@ -73,9 +74,11 @@ jobs: - name: Terraform Init run: | terraform -chdir=terraform/infrastructure init - terraform -chdir=terraform/infrastructure workspace new ${{ needs.set-environment-id.outputs.environment_id }} || \ terraform -chdir=terraform/infrastructure workspace select ${{ needs.set-environment-id.outputs.environment_id }} + - name: Build artifacts + run: cd terraform/infrastructure && make build-artifacts + - name: Terraform Destroy run: | terraform -chdir=terraform/infrastructure destroy \