From a4251542ae5eeb8c0bde3b84ee5959c206efe272 Mon Sep 17 00:00:00 2001 From: Bernardo Guerreiro Date: Tue, 23 Jan 2024 22:46:08 +0000 Subject: [PATCH] ci: teardown stack after pr --- .github/workflows/pull_request.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 6996a69..5652671 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -35,4 +35,15 @@ jobs: - name: Run functional tests run: echo "Running functional tests against ${{ needs.deploy-ephemeral.outputs.SERVICE_URL }}" env: - SERVICE_URL: ${{ needs.deploy-ephemeral.outputs.SERVICE_URL }} \ No newline at end of file + SERVICE_URL: ${{ needs.deploy-ephemeral.outputs.SERVICE_URL }} + + teardown-ephemeral-env: + uses: ./.github/workflows/stack-delete.yaml + needs: run-functional-tests + permissions: + id-token: write + contents: read + secrets: + AWS_DEPLOYER_ROLE: ${{ secrets.AWS_DEPLOYER_ROLE }} + with: + ENVIRONMENT: ${{ github.actor }}-${{ github.event.pull_request.number }} \ No newline at end of file