Skip to content

Commit

Permalink
modified ghactions-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
devenkulkarni committed Apr 9, 2024
1 parent 607b67c commit f6f4094
Showing 1 changed file with 15 additions and 21 deletions.
36 changes: 15 additions & 21 deletions .github/workflows/ghactions-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,39 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Terraform Format Check
uses: hashicorp/setup-terraform@v1
id: fmt
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.5.0
if: github.ref == 'refs/heads/main'
env:
TF_ACTION: fmt
TF_COMMAND: "terraform fmt -diff -check -recursive"
terraform_version: 1.7.5
run: terraform fmt -diff -check -recursive"

terraform-init:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Terraform Init
uses: hashicorp/setup-terraform@v1
id: init
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.5.0
if: github.ref == 'refs/heads/main'
env:
TF_ACTION: init
TF_COMMAND: "terraform init"

terraform_version: 1.7.5
run: terraform init

terraform-plan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Terraform Plan
uses: hashicorp/setup-terraform@v1
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.5.0
if: github.ref == 'refs/heads/main'
terraform_version: 1.7.5
run: terraform plan
env:
TF_ACTION: plan
TF_COMMAND: "terraform plan"
METAL_AUTH_TOKEN: ${{ secrets.metal_auth_token }}
TF_VAR_project_name: ${{ secrets.project_name }}

0 comments on commit f6f4094

Please sign in to comment.