Upgrade of gems and javascript packages #239
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Destroy | |
on: | |
pull_request: | |
branches: [ main ] | |
types: [ closed ] | |
jobs: | |
destroy: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
name: Checkout Code | |
- name: Terraform pin version | |
uses: hashicorp/[email protected] | |
with: | |
terraform_version: 0.14.0 | |
- name: Destroy review app | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
TF_VAR_paas_user: ${{ secrets.GOVPAAS_USERNAME }} | |
TF_VAR_paas_password: ${{ secrets.GOVPAAS_PASSWORD }} | |
TF_VAR_statuscake_username: ${{ secrets.STATUSCAKE_USERNAME }} | |
TF_VAR_statuscake_apikey: ${{ secrets.STATUSCAKE_APIKEY }} | |
run: | | |
cd terraform/app | |
terraform init -reconfigure -input=false -backend-config="bucket=${{ secrets.AWS_BUCKET }}" -backend-config="key=review-pr-${{ github.event.number }}/terraform.tfstate" | |
terraform destroy -input=false -auto-approve -var-file ../workspace-variables/review.tfvars -var='environment=${{github.event.inputs.environment}}' | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Delete terraform backend files | |
run: | | |
aws s3 rm s3://${{ secrets.AWS_BUCKET }}/review-pr-${{ github.event.number }}/terraform.tfstate |