Skip to content

Commit

Permalink
chore: prune env (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
mishraomp authored Dec 29, 2024
1 parent 0c40958 commit a324caa
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/prune-env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Destroy Stack
on:
workflow_dispatch:
inputs:
environment_name:
description: 'The name of the environment to destroy resources from dev or test or prod(BE CAREFUL HERE)'
required: true
default: 'dev'
type: string
app_env:
required: true
type: string
description: 'The APP env separates between AWS ENV and Actual APP, since AWS dev is where PR, and TEST is deployed'
jobs:
cleanup-aws-database:
name: Cleanup AWS Database
uses: ./.github/workflows/.deployer.yml
secrets: inherit
with:
environment_name: ${{ github.event.inputs.environment_name }}
command: destroy
working_directory: database
AWS_DEPLOY_ROLE_ARN: ${{ secrets.AWS_DEPLOY_ROLE_ARN }}
AWS_LICENSE_PLATE: ${{ secrets.AWS_LICENSE_PLATE }}
cleanup-aws-api:
name: Cleanup AWS API
uses: ./.github/workflows/.deployer.yml
secrets: inherit
with:
environment_name: ${{ github.event.inputs.environment_name }}
command: destroy
working_directory: api
app_env: ${{ github.event.inputs.app_env }}
AWS_DEPLOY_ROLE_ARN: ${{ secrets.AWS_DEPLOY_ROLE_ARN }}
AWS_LICENSE_PLATE: ${{ secrets.AWS_LICENSE_PLATE }}
cleanup-aws-cf:
name: Cleanup AWS CF
uses: ./.github/workflows/.deployer.yml
secrets: inherit
with:
environment_name: ${{ github.event.inputs.environment_name }}
command: destroy
working_directory: frontend
app_env: ${{ github.event.inputs.app_env }}
AWS_DEPLOY_ROLE_ARN: ${{ secrets.AWS_DEPLOY_ROLE_ARN }}
AWS_LICENSE_PLATE: ${{ secrets.AWS_LICENSE_PLATE }}

0 comments on commit a324caa

Please sign in to comment.