Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,42 @@ jobs:
echo "TEST remote state access verified."
# Preview infrastructure changes without applying them.
- name: Plan TEST infrastructure
shell: bash
env:
TF_IN_AUTOMATION: "true"
run: |
set -euo pipefail
for STACK in network frontend; do
echo "::group::TEST $STACK plan"
set +e
tofu -chdir="environments/test/$STACK" plan \
-input=false \
-no-color \
-lock-timeout=5m \
-detailed-exitcode
EXIT_CODE=$?
set -e
case "$EXIT_CODE" in
0)
echo "TEST $STACK: No changes required."
;;
2)
echo "::warning::TEST $STACK: Infrastructure changes detected. Review the plan."
;;
*)
echo "::error::TEST $STACK: Planning failed."
exit "$EXIT_CODE"
;;
esac
echo "::endgroup::"
done
# Remove temporary credentials even when verification fails.
- name: Clean up Kubernetes credentials
if: always()
Expand Down