38 lines
707 B
YAML
38 lines
707 B
YAML
name: Deploy
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- tf/**
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4.2.2
|
|
|
|
- name: Setup OpenTofu
|
|
uses: opentofu/setup-opentofu@v1
|
|
|
|
- name: OpenTofu init
|
|
id: init
|
|
run: tofu init
|
|
|
|
- name: OpenTofu validate
|
|
id: validate
|
|
run: tofu validate -no-color
|
|
|
|
- name: OpenTofu refresh
|
|
id: validate
|
|
run: tofu refresh
|
|
|
|
- name: OpenTofu plan
|
|
id: plan
|
|
run: tofu plan -no-color -out /tmp/plan.tfplan
|
|
|
|
- name: OpenTofu apply
|
|
id: apply
|
|
run: tofu apply /tmp/plan.tfplan
|