Skip to content

Commit 58f753e

Browse files
authored
ci: Use ubuntu-latest instead of MacOS for docs checks (#1074)
1 parent ca7593a commit 58f753e

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/lint.yml

+12-8
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,22 @@ jobs:
2121

2222
docs:
2323
name: Docs
24-
runs-on: macos-latest
24+
runs-on: ubuntu-latest
2525
steps:
2626
- uses: actions/checkout@master
27-
- name: Install Deps
27+
- uses: actions/setup-python@v2
28+
- name: Install terraform-docs
2829
run: |
29-
# Temporary fix for https://github.com/actions/virtual-environments/issues/1811
30-
brew untap local/homebrew-openssl
31-
brew untap local/homebrew-python2
32-
brew update
33-
brew install pre-commit terraform-docs terraform
30+
# Get the download url of the latest version of terraform-docs
31+
tf_docs_download_url=$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | jq -rc '.assets[] | select( .name | contains("linux-amd64")).browser_download_url')
32+
mkdir -p $GITHUB_WORKSPACE/bin
33+
curl -Lo $GITHUB_WORKSPACE/bin/terraform-docs $tf_docs_download_url
34+
chmod +x $GITHUB_WORKSPACE/bin/terraform-docs
35+
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
3436
- name: Check Docs
35-
run: pre-commit run --show-diff-on-failure --all-files terraform_docs
37+
uses: pre-commit/[email protected]
38+
with:
39+
extra_args: --show-diff-on-failure --all-files terraform_docs
3640

3741
validate:
3842
name: Validate

0 commit comments

Comments
 (0)