test remove image compress #2259
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 Review Instance | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
destroy: | |
name: Destroy | |
environment: | |
name: Review | |
runs-on: ubuntu-latest | |
concurrency: Review_${{github.event.number}} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: set-up-environment | |
uses: DFE-Digital/github-actions/set-up-environment@master | |
- name: Setup Environment Variables | |
id: variables | |
run: | | |
echo "pr_name=${{env.REVIEW_APPLICATION}}-${{github.event.number}}" >> $GITHUB_OUTPUT | |
echo "TF_VAR_paas_app_route_name=${pr_name}" >> $GITHUB_ENV | |
- uses: hashicorp/setup-terraform@v2 | |
with: | |
terraform_version: 1.2.8 | |
- name: Terraform Destroy | |
run: | | |
cd terraform/paas && pwd | |
terraform init -backend-config=review.bk.vars -backend-config="key=${{steps.variables.outputs.pr_name}}.tfstate" | |
terraform destroy -var-file=review.env.tfvars -auto-approve | |
env: | |
ARM_ACCESS_KEY: ${{ secrets.ARM_ACCESS_KEY }} | |
TF_VAR_AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Delete Terraform Storage File | |
run: az storage blob delete --container-name pass-tfstate --account-name s146d01sgtfstate --account-key ${{secrets.ARM_ACCESS_KEY}} -n ${{steps.variables.outputs.pr_name}}.tfstate |