add in terraform actions #1
This file contains hidden or 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: tfactions | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
tfactions: | ||
name: tfactions | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: hashicorp/setup-terraform@v3 | ||
with: | ||
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }} | ||
- name: Terraform fmt execute | ||
id: fmt | ||
run: terraform fmt -recursive | ||
continue-on-error: true | ||
- name: Terraform fmt check | ||
id: fmt | ||
Check failure on line 23 in .github/workflows/tfactions.yml
|
||
run: terraform fmt -check | ||
continue-on-error: true | ||
- name: Terraform init | ||
id: init | ||
run: terraform init | ||
- name: Terraform validate | ||
id: validate | ||
run: terraform validate -no-color | ||
- name: Terraform plan | ||
id: plan | ||
run: terraform plan -no-color | ||
- run: echo ${{ steps.plan.outputs.stdout }} | ||
- run: echo ${{ steps.plan.outputs.stderr }} | ||
- run: echo ${{ steps.plan.outputs.exitcode }} | ||