Add prompt-on-launch support for workflow jobs #685
Workflow file for this run
This file contains hidden or 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
| name: Generate Terraform Plugin Documentation | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - stable-* | |
| jobs: | |
| generate-docs: | |
| runs-on: ubuntu-latest | |
| env: | |
| go_version: '1.24' | |
| steps: | |
| - name: Checkout Provider | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Go ${{ env.go_version }} | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.go_version }} | |
| - name: Install Go dependencies | |
| run: go get . | |
| - name: Build the Provider | |
| run: go build -v ./... | |
| - name: Install tfplugindocs | |
| run: go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@latest | |
| - uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_version: "1.14.0" | |
| - name: Generate documentation | |
| run: make generatedocs | |
| - name: Check for doc changes | |
| run: | | |
| if git diff --exit-code -- ':!go.mod' ':!go.sum'; then | |
| echo "Docs generation successful, no changes found." | |
| else | |
| echo "Error: Uncommitted changes found. Please run 'make generatedocs' and commit the changes." | |
| exit 1 | |
| fi |