Skip to content

Improve parsing of tf files #691

Improve parsing of tf files

Improve parsing of tf files #691

Workflow file for this run

name: Test terraform-check
on:
- pull_request
permissions:
contents: read
jobs:
no_changes:
runs-on: ubuntu-24.04
name: No changes
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Check
uses: ./terraform-check
id: check
with:
path: tests/workflows/test-check/no_changes
- name: Check failure-reason
env:
FAILURE_REASON: ${{ steps.check.outputs.failure-reason }}
run: |
if [[ "$FAILURE_REASON" != "" ]]; then
echo "::error:: failure-reason not set correctly"
exit 1
fi
plan_change_comment:
runs-on: ubuntu-24.04
name: Changes
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Check
uses: ./terraform-check
continue-on-error: true
id: check
with:
path: tests/workflows/test-check/changes
- name: Check failure-reason
env:
OUTCOME: ${{ steps.check.outcome }}
FAILURE_REASON: ${{ steps.check.outputs.failure-reason }}
run: |
if [[ "$OUTCOME" != "failure" ]]; then
echo "Check did not fail correctly"
exit 1
fi
if [[ "$FAILURE_REASON" != "changes-to-apply" ]]; then
echo "::error:: failure-reason not set correctly"
exit 1
fi