Files
TerraHome/.gitea/workflows/terraform-plan.yml
MichaelFisher1997 364dc6b35b
Some checks failed
Gitea Actions Demo / Terraform Plan (push) Failing after 13s
fix: use TF_VAR_ prefix for token credentials
- Restore pm_api_token_id and pm_api_token_secret variables
- Use TF_VAR_pm_api_token_id and TF_VAR_pm_api_token_secret env vars
- This is the standard Terraform way to pass variables via environment
2026-02-27 20:43:39 +00:00

56 lines
1.3 KiB
YAML

name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on:
push:
branches:
- stage
- test
jobs:
terraform:
name: "Terraform Plan"
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
env:
TF_VAR_SSH_KEY_PUBLIC: ${{ secrets.SSH_KEY_PUBLIC }}
TF_VAR_TS_AUTHKEY: ${{ secrets.TS_AUTHKEY }}
TF_VAR_pm_api_token_id: ${{ secrets.PM_API_TOKEN_ID }}
TF_VAR_pm_api_token_secret: ${{ secrets.PM_API_TOKEN_SECRET }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.6.6
- name: Terraform Init
working-directory: terraform
run: terraform init
- name: Terraform Format Check
working-directory: terraform
run: terraform fmt -check -recursive
- name: Terraform Validate
working-directory: terraform
run: terraform validate
- name: Terraform Plan
working-directory: terraform
run: terraform plan -out=tfplan
- name: Upload Terraform Plan
uses: actions/upload-artifact@v3
with:
name: terraform-plan
path: terraform/tfplan