build(deps): bump actions/checkout from 6.0.2 to 6.0.3 in the github-actions group #164
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: Check API Documentation | |
| on: | |
| pull_request: | |
| # Only run this workflow if Go files in the API directories or the config changes | |
| paths: | |
| - 'api/**/*.go' | |
| - 'extensions/api/**/*.go' | |
| - 'config.yaml' | |
| - '.github/workflows/check-api-docs.yml' | |
| permissions: | |
| contents: read | |
| jobs: | |
| check-api-docs: | |
| name: Verify Generated API Docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Setup Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| # Automatically uses the Go version defined in the repo's go.mod | |
| go-version-file: 'go.mod' | |
| cache: true | |
| - name: Install crd-ref-docs | |
| run: go install github.com/elastic/crd-ref-docs@latest | |
| - name: Generate API Documentation | |
| run: | | |
| echo "Running crd-ref-docs..." | |
| crd-ref-docs \ | |
| --source-path=./ \ | |
| --config=./docs/crd-ref-docs.yaml \ | |
| --renderer=markdown \ | |
| --output-path=./docs/api.md \ | |
| --max-depth=10 | |
| - name: Verify no uncommitted changes | |
| run: | | |
| # Stage the file so git diff can check it | |
| git add ./docs/api.md | |
| # Check if there are any differences | |
| if ! git diff --staged --exit-code; then | |
| echo "::error::API documentation is out of date!" | |
| echo "Please generate the API documentation locally and include it in your commit." | |
| echo "You can view the diff below:" | |
| git diff --staged | |
| exit 1 | |
| fi | |
| echo "API documentation is up to date!" |