File tree Expand file tree Collapse file tree 5 files changed +119
-9
lines changed
asset-account/terraform/stack-set Expand file tree Collapse file tree 5 files changed +119
-9
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,14 @@ if command_exists typos; then
3434 echo " $files " | xargs typos
3535fi
3636
37+ if command_exists terraform-docs; then
38+ pushd asset-account/terraform/stack-set
39+ files=" $files asset-account/terraform/stack-set/README.md"
40+
41+ terraform-docs markdown . --output-file README.md
42+ popd
43+ fi
44+
3745if command_exists ./node_modules/.bin/prettier; then
3846 echo " $files " | xargs ./node_modules/.bin/prettier --ignore-unknown --write
3947fi
Original file line number Diff line number Diff line change 4747 - run : terraform validate
4848 working-directory : ${{ matrix.project }}
4949
50+ terraform-docs :
51+ runs-on : ubuntu-latest
52+
53+ strategy :
54+ matrix :
55+ terraform_module :
56+ - asset-account/terraform/stack-set
57+
58+ steps :
59+ - uses : actions/checkout@v4
60+ - uses : actions/setup-node@v4
61+ with :
62+ node-version : " 22"
63+ cache : " npm"
64+ - run : npm ci --ignore-scripts
65+
66+ - run : |
67+ curl https://github.com/terraform-docs/terraform-docs/releases/download/v0.19.0/terraform-docs-v0.19.0-linux-amd64.tar.gz \
68+ --location \
69+ --silent \
70+ --retry 5 \
71+ --retry-all-errors \
72+ --show-error \
73+ | tar -xz terraform-docs > ./terraform-docs
74+ working-directory: ${{ matrix.terraform_module }}
75+
76+ - run : chmod +x ./terraform-docs
77+ working-directory : ${{ matrix.terraform_module }}
78+
79+ - run : ./terraform-docs markdown . --output-file README.md
80+ working-directory : ${{ matrix.terraform_module }}
81+
82+ - run : npx prettier -w .
83+
84+ - run : >-
85+ git diff --exit-code --color=always || ( echo "Terraform docs are
86+ out-of-date. See the diff above." && exit 1 )
87+
5088 prettier :
5189 runs-on : ubuntu-latest
5290 steps :
Original file line number Diff line number Diff line change 33terraform.tfstate
44terraform.tfstate.backup
55terraform.tfvars
6+ /node_modules
You can’t perform that action at this time.
0 commit comments