fix(ci): fix build-docs.yml's dead workflow reference, add permission… #623
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
| on: | |
| workflow_call: | |
| inputs: | |
| ref: | |
| description: "Branch, tag or SHA to build. Empty = the caller's ref." | |
| required: false | |
| type: string | |
| default: "" | |
| artifact-name: | |
| description: > | |
| Name to upload the build output under. The release flow runs this | |
| workflow twice in one run -- once on the branch, once on the tag -- and | |
| upload-artifact rejects a duplicate name. | |
| required: false | |
| type: string | |
| default: "dist" | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| permissions: | |
| contents: read | |
| jobs: | |
| linting: | |
| name: Check linting | |
| uses: ./.github/workflows/lint.yml | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| reqstool-source: [pypi, main] | |
| steps: | |
| # Full history and tags: Nisse derives the version from git state, so a | |
| # shallow clone would build the wrong number rather than fail. | |
| - uses: actions/checkout@v7.0.1 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| ref: ${{ inputs.ref || github.ref }} | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5.7.0 | |
| with: | |
| java-version: "21" | |
| distribution: "temurin" | |
| - name: Build and run tests | |
| run: mvn clean verify | |
| - name: Install into local repository | |
| run: mvn -DskipTests install | |
| - name: Self-apply own annotation processor to own sources | |
| run: mvn compiler:compile compiler:testCompile -Pself-apply | |
| - name: Combine main/test annotation processor output | |
| # The processor's main/test annotation outputs land in separate | |
| # generated-sources directories (no shared mojo to combine them, unlike | |
| # the Maven/Gradle plugins) -- merge them the same way those plugins' | |
| # combineOutput() would, so reqstool status has real, non-fabricated data. | |
| run: | | |
| scripts/combine-annotations.sh \ | |
| target/generated-sources/annotations/resources/annotations.yml \ | |
| target/generated-test-sources/test-annotations/resources/annotations.yml \ | |
| target/reqstool/annotations.yml | |
| - name: Install reqstool | |
| uses: reqstool/.github/.github/actions/install-reqstool@9c6feaab046f4782f430dd2527fdb82c2a5cd926 # main 2026-06-22 | |
| with: | |
| reqstool-source: ${{ matrix.reqstool-source }} | |
| - name: Validate reqstool spec completeness | |
| # not yet available in the latest PyPI release | |
| if: matrix.reqstool-source == 'main' | |
| uses: reqstool/.github/.github/actions/validate-reqstool@9c6feaab046f4782f430dd2527fdb82c2a5cd926 # main 2026-06-22 | |
| - name: Run reqstool status | |
| uses: reqstool/.github/.github/actions/reqstool-status@9c6feaab046f4782f430dd2527fdb82c2a5cd926 # main 2026-06-22 | |
| with: | |
| fail-if-incomplete: "true" | |
| validate-openspec: | |
| uses: reqstool/.github/.github/workflows/common-validate-openspec.yml@9c6feaab046f4782f430dd2527fdb82c2a5cd926 # main 2026-06-22 |