Skip to content

Commit

Permalink
Update teardown.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
86LAK authored May 1, 2024
1 parent 88c9a38 commit c097894
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/teardown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,29 @@ on:
required: true

jobs:
Teardown:

deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x


- uses: levibostian/action-hide-sensitive-inputs@v1

- name: Set AWS Credentials as Environment Variables and Save to File
run: |
echo "$AWS_CREDENTIALS" | tr " " "\n" > credentials.txt
export $(echo "$AWS_CREDENTIALS" | tr " " "\n")
- name: Teardown to AWS
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
run: |
echo "::add-mask::${{ github.event.inputs.awsCredentials }}"
terraform init
terraform destroy -auto-approve
terraform init
terraform destroy -auto-approve
rm credentials.txt

0 comments on commit c097894

Please sign in to comment.