Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 8 additions & 18 deletions .github/workflows/test-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand All @@ -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."
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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