-
-
Notifications
You must be signed in to change notification settings - Fork 169
51 lines (43 loc) · 1.21 KB
/
test-check.yaml
File metadata and controls
51 lines (43 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Test terraform-check
on:
- pull_request
jobs:
no_changes:
runs-on: ubuntu-latest
name: No changes
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check
uses: ./terraform-check
id: check
with:
path: tests/workflows/test-check/no_changes
- name: Check failure-reason
run: |
if [[ "${{ steps.check.outputs.failure-reason }}" != "" ]]; then
echo "::error:: failure-reason not set correctly"
exit 1
fi
plan_change_comment:
runs-on: ubuntu-latest
name: Changes
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check
uses: ./terraform-check
continue-on-error: true
id: check
with:
path: tests/workflows/test-check/changes
- name: Check failure-reason
run: |
if [[ "${{ steps.check.outcome }}" != "failure" ]]; then
echo "Check did not fail correctly"
exit 1
fi
if [[ "${{ steps.check.outputs.failure-reason }}" != "changes-to-apply" ]]; then
echo "::error:: failure-reason not set correctly"
exit 1
fi