Skip to content

Create ghactions-ci.yml #5

Create ghactions-ci.yml

Create ghactions-ci.yml #5

Workflow file for this run

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