diff --git a/.github/workflows/test-pr.yaml b/.github/workflows/test-pr.yaml index cefd21d..18a8a00 100644 --- a/.github/workflows/test-pr.yaml +++ b/.github/workflows/test-pr.yaml @@ -35,18 +35,10 @@ jobs: --output-folder "${RUNNER_TEMP}/features" \ --force-clean-output-folder - gen-docs: - if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} + docs-check: runs-on: ubuntu-latest - permissions: - # Give the default GITHUB_TOKEN write permission to commit and push the - # added or changed files to the repository. - contents: write steps: - uses: actions/checkout@v6 - with: - ref: ${{ github.head_ref }} - token: ${{ secrets.CI_BOT_TOKEN }} - name: Install devcontainer CLI run: npm install --global @devcontainers/cli@0.88.0 @@ -66,13 +58,12 @@ jobs: --github-owner "${GITHUB_REPOSITORY_OWNER}" \ --github-repo "${GITHUB_REPOSITORY#*/}" - - uses: stefanzweifel/git-auto-commit-action@v7 - with: - commit_message: Update generated docs + - name: Verify generated docs are up to date + run: git diff --exit-code -- features/src templates/src complete: needs: - - gen-docs + - docs-check - feature-tests - smoke-test if: always() @@ -82,13 +73,13 @@ jobs: env: SMOKE_TEST_RESULT: ${{ needs.smoke-test.result }} FEATURE_TESTS_RESULT: ${{ needs.feature-tests.result }} - GEN_DOCS_RESULT: ${{ needs.gen-docs.result }} + DOCS_CHECK_RESULT: ${{ needs.docs-check.result }} run: | set -euo pipefail echo "smoke_test: ${SMOKE_TEST_RESULT}" echo "feature_tests: ${FEATURE_TESTS_RESULT}" - echo "gen_docs: ${GEN_DOCS_RESULT}" + echo "docs_check: ${DOCS_CHECK_RESULT}" if [[ "${SMOKE_TEST_RESULT}" != "success" ]]; then echo "Required job 'smoke_test' did not succeed." @@ -100,9 +91,8 @@ jobs: exit 1 fi - # gen_docs is skipped for fork PRs by design; treat that as acceptable. - if [[ "${GEN_DOCS_RESULT}" != "success" && "${GEN_DOCS_RESULT}" != "skipped" ]]; then - echo "Required job 'gen_docs' failed or was cancelled." + if [[ "${DOCS_CHECK_RESULT}" != "success" ]]; then + echo "Required job 'docs-check' did not succeed." exit 1 fi diff --git a/README.md b/README.md index f48ebe6..ff5e7c3 100644 --- a/README.md +++ b/README.md @@ -25,5 +25,5 @@ XWayland setups are auto-detected from the mounted runtime directory. ## Workflows -- `.github/workflows/test-pr.yaml`: smoke tests template changes, validates features, and refreshes generated docs on pull requests +- `.github/workflows/test-pr.yaml`: smoke tests template changes, validates features, and checks that generated docs are current on pull requests - `.github/workflows/release.yaml`: publishes Features and Templates with the Dev Container CLI, combines their discovery metadata under one OCI collection, attaches a versioned source bundle to GitHub releases, and supports manual dry runs