Skip to content

DAC-1470 Implement Cognito solution for Quicksight auth #157

DAC-1470 Implement Cognito solution for Quicksight auth

DAC-1470 Implement Cognito solution for Quicksight auth #157

name: ✳️ Pull request tear down
on:
workflow_dispatch:
pull_request:
types:
- closed
paths-ignore:
- '**.md'
jobs:
validate-deployment-or-teardown:
runs-on: ubuntu-latest
outputs:
valid: ${{ steps.validate.outputs.valid }}
steps:
- name: Check out repository code
uses: actions/checkout@v4
- id: validate
name: Validate branch eligibility for tear down
run: scripts/validate-deployment-or-teardown.sh ${{ github.head_ref }} >> $GITHUB_OUTPUT
tear-down-feature:
needs: [validate-deployment-or-teardown]
if: needs.validate-deployment-or-teardown.outputs.valid == 'true'
# These permissions are needed to interact with GitHub's OIDC Token endpoint (enabling the aws-actions/configure-aws-credentials action)
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Assume AWS role
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-2
role-to-assume: ${{ secrets.FEATURE_ENVIRONMENT_TEAR_DOWN_ROLE_ARN }}
- name: Prepare for stack deletion
run: npm run teardown:prepare
- name: Delete CF stack
run: npm run teardown:delete-stack