Skip to content

Commit

Permalink
what's going on
Browse files Browse the repository at this point in the history
  • Loading branch information
khos2ow committed Mar 18, 2021
1 parent b88a43c commit 029abb7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ jobs:
output-file: README.md
config-file: .terraform-docs.yml

- name: TEMP Should generate README.md for tf12_fail_diff and fail on diff
uses: ./
with:
working-dir: examples/tf12_fail_diff
output-file: README.md
indention: 3

- name: Should generate README.md for tf12_inject and push up all changes
uses: ./
with:
Expand All @@ -85,4 +92,4 @@ jobs:
working-dir: examples/tf12_fail_diff
output-file: README.md
indention: 3
fail-on-diff: true
fail-on-diff: true
3 changes: 2 additions & 1 deletion examples/tf12_fail_diff/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
with:
working-dir: examples/tf12_fail_diff
output-file: README.md
indention: 3
fail-on-diff: true
```
Expand Down Expand Up @@ -60,4 +61,4 @@ No Modules.
|------|-------------|
| vpc\_id | The Id of the VPC |

<!--- END_TF_DOCS --->
<!--- END_TF_DOCS --->
6 changes: 6 additions & 0 deletions src/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ else
num_changed=$(git_status)
set -e
if [ "${FAIL_ON_DIFF}" == "true" ] && [ "${num_changed}" -ne 0 ]; then
echo "git status"
git status
echo "=========="
echo "git diff"
git diff
echo "=========="
echo "::error file=entrypoint.sh,line=169::Uncommitted change(s) has been found!"
exit 1
fi
Expand Down

0 comments on commit 029abb7

Please sign in to comment.