-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
39 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 '[email protected]' | ||
git add terraform.tfstate terraform.tfstate.backup | ||
git commit -m "Add updated state" | ||
git push origin | ||
- name: test | ||
run: cat .git/branches/config |