From 9482ab103947bf5bd2aa898bb39b677972fd9393 Mon Sep 17 00:00:00 2001 From: "BARRY Thierno Ibrahima (Canal Plus Prestataire)" Date: Wed, 28 Oct 2020 23:46:19 +0100 Subject: [PATCH 1/2] ci: Use ubuntu-latest instead of MacOS for docs checks --- .github/workflows/lint.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1efb366fc0..700f6ffbf2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,18 +21,22 @@ jobs: docs: name: Docs - runs-on: macos-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - name: Install Deps + - uses: actions/setup-python@v2 + - name: Install terraform-docs run: | - # Temporary fix for https://github.com/actions/virtual-environments/issues/1811 - brew untap local/homebrew-openssl - brew untap local/homebrew-python2 - brew update - brew install pre-commit terraform-docs terraform + # Get the download url of the latest version of terraform-docs + 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') + mkdir -p $GITHUB_WORKSPACE/bin + curl -sLo $GITHUB_WORKSPACE/bin/terraform-docs $tf_docs_download_url + chmod +x $GITHUB_WORKSPACE/bin/terraform-docs + echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH - name: Check Docs - run: pre-commit run --show-diff-on-failure --all-files terraform_docs + uses: pre-commit/action@v2.0.0 + with: + extra_args: --show-diff-on-failure --all-files terraform_docs validate: name: Validate From 60fae7915e8edab4d960734b771efea2f80b8a1f Mon Sep 17 00:00:00 2001 From: "BARRY Thierno Ibrahima (Canal Plus Prestataire)" Date: Thu, 29 Oct 2020 01:10:22 +0100 Subject: [PATCH 2/2] Don't use curl in quiet mode during download --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 700f6ffbf2..13f9c894af 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,7 +30,7 @@ jobs: # Get the download url of the latest version of terraform-docs 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') mkdir -p $GITHUB_WORKSPACE/bin - curl -sLo $GITHUB_WORKSPACE/bin/terraform-docs $tf_docs_download_url + curl -Lo $GITHUB_WORKSPACE/bin/terraform-docs $tf_docs_download_url chmod +x $GITHUB_WORKSPACE/bin/terraform-docs echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH - name: Check Docs