Draft
Add PR CI that runs the example workflow and guards README drift#33
Conversation
Copilot created this pull request from a session on behalf of
felickz
June 29, 2026 21:24
View session
Copilot stopped work on behalf of
felickz due to an error
June 29, 2026 21:24
Copilot stopped work on behalf of
felickz due to an error
June 29, 2026 21:24
Copilot stopped work on behalf of
felickz due to an error
June 29, 2026 21:25
…ode via local refs
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was no CI to validate PRs. Running the sample-app workflow on PRs is a good end-to-end smoke test, but the existing
example-app.ymlpins actions to@main(so it documents usage) and only triggers onworkflow_dispatch, so it never ran automatically and the README copy could silently diverge.Changes
example-app.yml: exposeworkflow_call— adds the trigger (keepsworkflow_dispatch) so CI can invoke the documented pipeline as-is. No job/logic changes, so it remains a copy-pasteable example.ci.yml(new):pull_request+push:main+workflow_dispatch—permissions: contents: read. Two jobs:docs-drift: diffs thejobs:block of the README's first yaml example againstexample-app.yml, normalizing the action ref (@v1vs@main) and blank lines. Fails if they drift.example-app:uses: ./.github/workflows/example-app.ymlto run build-matrix → analyze → workflow-summary end to end.Security
pull_request, notpull_request_target— fork PRs run with a read-only token and no secrets, so malicious PR input cannot exfiltrate secrets or gain write access.contents: readonly; the example's write-capable inputs (requestGitHubAnalysis,uploadToCodeScanning) stay off by default.Known tradeoff
Because
example-app.ymlreferences actions at@main(to stay valid as docs), theexample-appjob validates PR action-code (analyze/,build-matrix/,workflow-summary/) only onpush:main, not on the PR itself; PR-side coverage is the example structure and README. Closing that gap requires a job with local./refs + checkout (more workflow code, slightly more brittle) and can be added if desired.Note:
build-matrixhas nocontinue-on-error, andanalyzebuilds a real CodeQL DB (multi-minute run), so consider this before making the check required.