iac/.forgejo/workflows/tofu.yml

33 lines
785 B
YAML
Raw Normal View History

2024-10-12 16:35:50 -04:00
name: Terraform Apply
on:
push:
paths:
- 'terraform/**'
jobs:
terraform:
2024-10-12 19:36:42 -04:00
runs-on: ubuntu-latest
2024-10-12 16:35:50 -04:00
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download OpenTofu Installer
run: |
curl --proto '=https' --tlsv1.2 -fsSL https://get.opentofu.org/install-opentofu.sh -o install-opentofu.sh
chmod +x install-opentofu.sh
- name: Inspect and Install OpenTofu
run: ./install-opentofu.sh --install-method deb
- name: Clean up Installer Script
run: rm -f install-opentofu.sh
- name: Initialize OpenTofu
2024-10-12 19:36:42 -04:00
run: tofu init
2024-10-12 16:35:50 -04:00
working-directory: ./terraform
- name: Apply OpenTofu
2024-10-12 19:36:42 -04:00
run: tofu apply -input=false
2024-10-12 16:35:50 -04:00
working-directory: ./terraform