Skip to content

Commit

Permalink
chore: trying
Browse files Browse the repository at this point in the history
  • Loading branch information
mishraomp committed Dec 8, 2024
1 parent fe6f1c6 commit ac1a6fa
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/.deployer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
required: true
default: 'dev'
type: string
command:
description: 'The terragrunt command to run'
required: true
default: 'apply'
type: string



Expand Down Expand Up @@ -48,4 +53,4 @@ jobs:
aws_license_plate: ${{ secrets.AWS_LICENSE_PLATE }}
run: |
# Run terraform
terragrunt run-all apply --terragrunt-non-interactive
terragrunt run-all ${{inputs.command}} --terragrunt-non-interactive
13 changes: 13 additions & 0 deletions .github/workflows/pr-close.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: PR Close

on:
pull_request:
types: [closed]
jobs:
cleanup-aws:
name: Cleanup AWS
uses: ./.github/workflows/.deployer.yml
with:
environment_name: dev
command: destroy
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
uses: ./.github/workflows/.deployer.yml
with:
environment_name: dev
command: apply
secrets: inherit


6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -364,4 +364,8 @@ pyrightconfig.json
.idea
*.key
*.pem
*.pub
*.pub
**/node_modules
**/dist
# nested terragrunt-cache
**/.terragrunt-cache/**

0 comments on commit ac1a6fa

Please sign in to comment.