fixes #453 #452 (#454) #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source https://github.com/hashicorp/terraform-provider-awscc/blob/main/.github/workflows/tfplugindocs-check.yml | |
name: Check if tfplugindocs result matches /docs | |
on: | |
push: | |
branches: | |
- main | |
- "release/**" | |
jobs: | |
tfplugindocs_check: | |
name: tfplugindocs check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
go-version-file: tools/go.mod | |
- name: GOCACHE | |
run: | | |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV | |
- uses: actions/[email protected] | |
continue-on-error: true | |
timeout-minutes: 2 | |
with: | |
# TODO: Replace with supported mechanism when it is supported | |
# https://github.com/actions/setup-go/issues/54 | |
path: ${{ env.GOCACHE }} | |
key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }} | |
- uses: actions/[email protected] | |
continue-on-error: true | |
timeout-minutes: 2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} | |
- run: | | |
make tools | |
make docs | |
git add -N docs/ | |
git diff --exit-code |