Skip to content

ci: add build-docs workflow#322

Merged
jimisola merged 1 commit intomainfrom
ci/add-build-docs-workflow
Mar 13, 2026
Merged

ci: add build-docs workflow#322
jimisola merged 1 commit intomainfrom
ci/add-build-docs-workflow

Conversation

@jimisola
Copy link
Member

Summary

  • Add caller workflow for centralized Antora docs build validation
  • Runs on PRs and pushes to main when docs/** files change
  • Calls reusable workflow from reqstool/.github

Test plan

  • Verify Build Docs workflow passes after merge

Call the centralized reusable workflow from reqstool/.github to validate
Antora docs build cleanly on PRs and pushes to main.

Signed-off-by: jimisola <jimisola@jimisola.com>
@jimisola jimisola self-assigned this Mar 13, 2026
@jimisola jimisola merged commit 32f8479 into main Mar 13, 2026
4 checks passed
@jimisola jimisola deleted the ci/add-build-docs-workflow branch March 13, 2026 20:03

jobs:
build:
uses: reqstool/.github/.github/workflows/build-docs.yml@main

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 3 days ago

In general, the fix is to add an explicit permissions block to the workflow (either at the top level, applying to all jobs, or inside the specific job) that grants only the minimal scopes required by the workflow. Because this workflow only delegates work to a reusable workflow, and we do not see any need for write access here, the safest minimal starting point is to set contents: read at the workflow level. This both documents the intent and ensures the GITHUB_TOKEN is not accidentally granted broader privileges via defaults.

Concretely, in .github/workflows/build-docs.yml, add a permissions block between the name: and on: keys. For a minimal, read-only token suitable for typical documentation build workflows that only need to check out code or download artifacts, use:

permissions:
  contents: read

This will apply to all jobs (including the build job that uses the reusable workflow) unless they override permissions themselves. No additional imports, methods, or definitions are required; this is purely a YAML configuration change.

Suggested changeset 1
.github/workflows/build-docs.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml
--- a/.github/workflows/build-docs.yml
+++ b/.github/workflows/build-docs.yml
@@ -1,4 +1,6 @@
 name: Build Docs
+permissions:
+  contents: read
 on:
   workflow_dispatch:
   pull_request:
EOF
@@ -1,4 +1,6 @@
name: Build Docs
permissions:
contents: read
on:
workflow_dispatch:
pull_request:
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant