Update Terraform workflow file paths and output handling
All checks were successful
Terraform Deploy / Validate (push) Successful in 5s
Terraform Deploy / Plan (push) Successful in 5s
Terraform Deploy / Apply (push) Successful in 1m39s

- Change single quotes to double quotes in path filters for consistency
- Modify command redirection to use > instead of | tee for cleaner
  output handling
- Add explicit cat command to display plan output in logs
- Standardize whitespace formatting throughout files
This commit is contained in:
Damien
2026-05-03 21:07:27 +02:00
parent 1ff49e1a2e
commit 96394ab1b1
2 changed files with 15 additions and 13 deletions

View File

@@ -5,8 +5,8 @@ on:
branches: branches:
- dev - dev
paths: paths:
- 'terraform/**' - "terraform/**"
- '.gitea/workflows/terraform-*.yml' - ".gitea/workflows/terraform-*.yml"
env: env:
TF_WORKING_DIR: terraform/prod TF_WORKING_DIR: terraform/prod
@@ -89,8 +89,9 @@ jobs:
id: plan id: plan
run: | run: |
set +e set +e
terraform plan -input=false -no-color -detailed-exitcode -out=tfplan 2>&1 | tee plan_output.txt terraform plan -input=false -no-color -detailed-exitcode -out=tfplan > plan_output.txt 2>&1
EXITCODE=$? EXITCODE=$?
cat plan_output.txt
# Determine if there are changes # Determine if there are changes
if [ $EXITCODE -eq 2 ]; then if [ $EXITCODE -eq 2 ]; then

View File

@@ -5,8 +5,8 @@ on:
branches: branches:
- dev - dev
paths: paths:
- 'terraform/**' - "terraform/**"
- '.gitea/workflows/terraform-*.yml' - ".gitea/workflows/terraform-*.yml"
env: env:
TF_WORKING_DIR: terraform/prod TF_WORKING_DIR: terraform/prod
@@ -87,8 +87,9 @@ jobs:
id: plan id: plan
run: | run: |
set +e set +e
terraform plan -input=false -no-color -detailed-exitcode -out=tfplan 2>&1 | tee plan_output.txt terraform plan -input=false -no-color -detailed-exitcode -out=tfplan > plan_output.txt 2>&1
EXITCODE=$? EXITCODE=$?
cat plan_output.txt
echo "exitcode=${EXITCODE}" >> $GITHUB_OUTPUT echo "exitcode=${EXITCODE}" >> $GITHUB_OUTPUT
if [ $EXITCODE -eq 1 ]; then if [ $EXITCODE -eq 1 ]; then
exit 1 exit 1