From 7657cd5264738aaecdc54f6cdb5c10ffbef786b6 Mon Sep 17 00:00:00 2001 From: David Costa Date: Mon, 11 Nov 2024 17:03:42 +0000 Subject: [PATCH] chore: fix terraform docs behavior Signed-off-by: David Costa --- .github/workflows/ci.yaml | 2 +- .terraform-docs.yml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .terraform-docs.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bb406ca..76962d0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -61,7 +61,7 @@ jobs: echo '### Please run terraform-docs locally and commit the changes:' >> $GITHUB_STEP_SUMMARY echo '' >> $GITHUB_STEP_SUMMARY echo '```sh' >> $GITHUB_STEP_SUMMARY - echo 'docker run --rm --volume "$(pwd):/terraform-docs" -u $(id -u) quay.io/terraform-docs/terraform-docs:0.17.0 markdown --output-file README.md --output-mode inject /terraform-docs' >> $GITHUB_STEP_SUMMARY + echo 'docker run --rm --volume "$(pwd):/terraform-docs" -u $(id -u) quay.io/terraform-docs/terraform-docs markdown --output-file README.md --output-mode inject /terraform-docs' >> $GITHUB_STEP_SUMMARY echo 'git add README.md' >> $GITHUB_STEP_SUMMARY echo 'git commit --amend --no-edit' >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.terraform-docs.yml b/.terraform-docs.yml new file mode 100644 index 0000000..e5a1d09 --- /dev/null +++ b/.terraform-docs.yml @@ -0,0 +1,5 @@ +settings: + # https://github.com/terraform-docs/gh-actions/issues/98 + # Since we do not commit the lockfile, it has no effect in gh workflows. + # Changes local runs to match the gh workflow behavior. + lockfile: false