mirror of
https://github.com/2martens/terraform.git
synced 2026-10-17 20:06:52 +02:00
36 lines
908 B
YAML
36 lines
908 B
YAML
name: Prepare Terraform plan
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
|
|
jobs:
|
|
terraform:
|
|
name: 'Terraform'
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: "./terraform"
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Setup Terraform
|
|
uses: hashicorp/setup-terraform@v3
|
|
with:
|
|
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
|
|
- name: Terraform fmt
|
|
id: fmt
|
|
run: terraform fmt -check
|
|
continue-on-error: true
|
|
- name: Terraform init
|
|
run: terraform init --input=false
|
|
- name: Terraform Validate
|
|
id: validate
|
|
run: terraform validate -no-color
|
|
- name: Terraform apply
|
|
id: apply
|
|
run: terraform apply --input=false
|
|
continue-on-error: true # terraform apply will always fail because of --input=false
|