Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ATX Header Support for terraform-docs #164

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ on:
types: [apb]

env:
BRANCH_NAME: improvement/support_atx_closed_markdown_headers
CURL_CACHE_DIR: ~/.cache/curl
DEPTH: 1
PIP_CACHE_DIR: ~/.cache/pip
PRE_COMMIT_CACHE_DIR: ~/.cache/pre-commit
REPO_URL: https://github.com/mcdonnnj/terraform-docs.git
RUN_TMATE: ${{ secrets.RUN_TMATE }}
michaelsaki marked this conversation as resolved.
Show resolved Hide resolved

jobs:
Expand Down Expand Up @@ -124,11 +127,20 @@ jobs:
PACKAGE_URL: honnef.co/go/tools/cmd/staticcheck
PACKAGE_VERSION: ${{ steps.setup-env.outputs.staticcheck-version }}
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
- name: Install Terraform-docs
env:
PACKAGE_URL: github.com/terraform-docs/terraform-docs
PACKAGE_VERSION: ${{ steps.setup-env.outputs.terraform-docs-version }}
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
# We are temporarily using @mcdonnnj's forked branch of terraform-docs
# until his PR: https://github.com/terraform-docs/terraform-docs/pull/745
# is approved. This temporary fix will allow for ATX Header Support when
michaelsaki marked this conversation as resolved.
Show resolved Hide resolved
# terraform-docs is ran during lint.
michaelsaki marked this conversation as resolved.
Show resolved Hide resolved
- name: Clone ATX Headers branch from Terraform-docs Fork
michaelsaki marked this conversation as resolved.
Show resolved Hide resolved
run: |
git clone --branch $BRANCH_NAME --single-branch \
--depth=$DEPTH $REPO_URL /tmp/terraform-docs
michaelsaki marked this conversation as resolved.
Show resolved Hide resolved
- name: Build and Install Terraform-docs Binary
michaelsaki marked this conversation as resolved.
Show resolved Hide resolved
run: |
cd /tmp/terraform-docs
GOBIN=$(go env GOPATH)/bin
go build -o $GOBIN/terraform-docs
echo "$GOBIN" >> $GITHUB_PATH
michaelsaki marked this conversation as resolved.
Show resolved Hide resolved
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
Expand Down