@@ -32,10 +32,11 @@ jobs:
3232 echo '${{ toJson(github) }}'
3333 REF=${{ github.ref }}
3434 echo "REF=$REF"
35- pwd
36- ls
37- ls ./scripts
38- . ./scripts/sandbox-utils.sh "$REF"
35+ SANDBOX_NAME=$(./scripts/sandbox-utils.sh "$REF")
36+ echo "SANDBOX_NAME=$SANDBOX_NAME"
37+ echo "BEFORE: $GITHUB_ENV"
38+ echo "SANDBOX_NAME=$SANDBOX_NAME" >> $GITHUB_ENV
39+ echo "AFTER: $GITHUB_ENV"
3940
4041 sandbox-set-up :
4142 name : Step 1
@@ -69,19 +70,19 @@ jobs:
6970 targetAccountGroup : nhs-notify-template-management-dev
7071 targetComponent : sandbox
7172
72- # sandbox-tear-down:
73- # name: Step 3
74- # needs: acceptance-tests
75- # if: always()
73+ sandbox-tear-down :
74+ name : Step 3
75+ needs : acceptance-tests
76+ if : always()
7677
77- # uses: ./.github/workflows/dispatch_internal_repo_workflow.yaml
78- # secrets: inherit
79- # with:
80- # jobName: Sandbox tear down
81- # infraRepoName: nhs-notify-web-template-management
82- # releaseVersion: ${{ github.head_ref || github.ref_name }}
83- # targetWorkflow: dispatch-deploy-dynamic-env.yaml
84- # targetEnvironment: pr${{ github.event.number }}
85- # targetAccountGroup: nhs-notify-template-management-dev
86- # targetComponent: sandbox
87- # terraformAction: destroy
78+ uses : ./.github/workflows/dispatch_internal_repo_workflow.yaml
79+ secrets : inherit
80+ with :
81+ jobName : Sandbox tear down
82+ infraRepoName : nhs-notify-web-template-management
83+ releaseVersion : ${{ github.head_ref || github.ref_name }}
84+ targetWorkflow : dispatch-deploy-dynamic-env.yaml
85+ targetEnvironment : pr${{ github.event.number }}
86+ targetAccountGroup : nhs-notify-template-management-dev
87+ targetComponent : sandbox
88+ terraformAction : destroy
0 commit comments