From 43f09a455236acf75cfc59e45457bb276464aac8 Mon Sep 17 00:00:00 2001 From: Ira <1463626+irab@users.noreply.github.com> Date: Fri, 16 Feb 2024 00:11:58 +1300 Subject: [PATCH] Update terraform_on_pr.yml --- .github/workflows/terraform_on_pr.yml | 41 ++------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/.github/workflows/terraform_on_pr.yml b/.github/workflows/terraform_on_pr.yml index 64516e2..119dcbd 100644 --- a/.github/workflows/terraform_on_pr.yml +++ b/.github/workflows/terraform_on_pr.yml @@ -24,42 +24,5 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} - - name: 'Get Terrahelp Binary' - run: wget -c https://github.com/opencredo/terrahelp/releases/download/v0.7.5/terrahelp_0.7.5_linux_amd64.tar.gz -O - | tar -xz - - - name: 'Check Integrity' # Double space needed between SHA and filename - run: echo "${{ env.terrahelp_shasum }} ./terrahelp" | shasum -a256 -c- - - - name: 'Decrypt State' - run: ./terrahelp decrypt --mode=full --simple-key=${{ secrets.TERRAHELP_KEY }} --nobackup --file terraform.tfstate -file=terraform.tfstate.backup - - - id: init - run: terraform init - - - id: validate - run: terraform validate -no-color - - - id: plan - run: terraform plan -no-color --input=false - continue-on-error: false - env: - TF_VAR_cloudflare_zone_id: ${{ secrets.CF_ZONE_ID }} - TF_VAR_cloudflare_api_token: ${{ secrets.CF_API_TOKEN }} - - - id: apply - run: terraform apply -no-color --input=false -auto-approve - continue-on-error: false - env: - TF_VAR_cloudflare_zone_id: ${{ secrets.CF_ZONE_ID }} - TF_VAR_cloudflare_api_token: ${{ secrets.CF_API_TOKEN }} - - - name: 'Encrypt State' - run: ./terrahelp encrypt --mode=full --simple-key=${{ secrets.TERRAHELP_KEY }} --nobackup --file terraform.tfstate -file=terraform.tfstate.backup - - - name: 'Commit New State' - run: | - git config --global user.name 'GitHub Actions' - git config --global user.email 'something@users.noreply.github.com' - git add terraform.tfstate terraform.tfstate.backup - git commit -m "Add updated state" - git push origin \ No newline at end of file + - name: test + run: cat .git/branches/config