|
24 | 24 | PIP_CACHE_DIR: ~/.cache/pip
|
25 | 25 | PRE_COMMIT_CACHE_DIR: ~/.cache/pre-commit
|
26 | 26 | RUN_TMATE: ${{ secrets.RUN_TMATE }}
|
| 27 | + TERRAFORM_DOCS_REPO_BRANCH_NAME: improvement/support_atx_closed_markdown_headers |
| 28 | + TERRAFORM_DOCS_REPO_DEPTH: 1 |
| 29 | + TERRAFORM_DOCS_REPO_URL: https://github.com/mcdonnnj/terraform-docs.git |
27 | 30 |
|
28 | 31 | jobs:
|
29 | 32 | diagnostics:
|
@@ -136,11 +139,23 @@ jobs:
|
136 | 139 | PACKAGE_URL: honnef.co/go/tools/cmd/staticcheck
|
137 | 140 | PACKAGE_VERSION: ${{ steps.setup-env.outputs.staticcheck-version }}
|
138 | 141 | run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
|
139 |
| - - name: Install Terraform-docs |
140 |
| - env: |
141 |
| - PACKAGE_URL: github.com/terraform-docs/terraform-docs |
142 |
| - PACKAGE_VERSION: ${{ steps.setup-env.outputs.terraform-docs-version }} |
143 |
| - run: go install ${PACKAGE_URL}@${PACKAGE_VERSION} |
| 142 | + # TODO: https://github.com/cisagov/skeleton-generic/issues/165 |
| 143 | + # We are temporarily using @mcdonnnj's forked branch of terraform-docs |
| 144 | + # until his PR: https://github.com/terraform-docs/terraform-docs/pull/745 |
| 145 | + # is approved. This temporary fix will allow for ATX header support when |
| 146 | + # terraform-docs is run during linting. |
| 147 | + - name: Clone ATX headers branch from terraform-docs fork |
| 148 | + run: | |
| 149 | + git clone \ |
| 150 | + --branch $TERRAFORM_DOCS_REPO_BRANCH_NAME \ |
| 151 | + --depth $TERRAFORM_DOCS_REPO_DEPTH \ |
| 152 | + --single-branch \ |
| 153 | + $TERRAFORM_DOCS_REPO_URL /tmp/terraform-docs |
| 154 | + - name: Build and install terraform-docs binary |
| 155 | + run: | |
| 156 | + go build \ |
| 157 | + -C /tmp/terraform-docs \ |
| 158 | + -o $(go env GOPATH)/bin/terraform-docs |
144 | 159 | - name: Install dependencies
|
145 | 160 | run: |
|
146 | 161 | python -m pip install --upgrade pip setuptools wheel
|
|
0 commit comments