Skip to content

modified ghactions-ci.yml #3

modified ghactions-ci.yml

modified ghactions-ci.yml #3

Workflow file for this run

name: Terraform Workflow
on:
push:
branches:
- main
pull_request:
jobs:
terraform-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Terraform Format Check
id: fmt
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.7.5
run: terraform fmt -diff -check -recursive"
terraform-init:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Terraform Init
id: init
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.7.5
run: terraform init
terraform-plan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Terraform Plan
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.7.5
run: terraform plan
env:
METAL_AUTH_TOKEN: ${{ secrets.metal_auth_token }}
TF_VAR_project_name: ${{ secrets.project_name }}