ci: trigger post-merge publish and deploy on push to main - #191
Open
jaysin586 wants to merge 1 commit into
Open
Conversation
- npm-publish.yml and cloudflare-deploy.yml now trigger on push to main instead of pull_request[closed]: GitHub withholds secrets from pull_request events raised by fork PRs — even the merged close event — so publishes and deploys silently failed for external contributions (mirror of humanspeak/svelte-motion#468). PR context (labels, title, URL) is recovered via listPullRequestsAssociatedWithCommit in check-if-merged, and all downstream github.event.pull_request.* references now read the recovered outputs. - Bump remaining action versions: actions/setup-python v6→v7, actions/stale v10→v11 (checkout, setup-node, cache, upload-artifact, github-script, codeql, import-gpg were already current here). - Harden trunk analytics: add Upload Vitest Results and Upload Playwright Results steps (trunk-io/analytics-uploader, telemetry-only with continue-on-error) to npm-publish.yml, and move the playwright junit report into test-results/junit-playwright.xml so the uploader and the playwright-results artifact both find it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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.
Mirror of humanspeak/svelte-motion#468.
Why
GitHub withholds repository secrets from
pull_requestevents triggered by fork PRs — including the mergedclosedevent. Since npm-publish and cloudflare-deploy triggered onpull_request[closed], publishes and deploys silently failed whenever an external contribution merged (first hit: svelte-motion PR #466).What changed
Push-trigger migration
npm-publish.ymlandcloudflare-deploy.ymlnow trigger onpushtomain(existingpaths:filters andworkflow_dispatchkept). Push events always run in the base repo with secrets.check-if-mergedrecovers the merged PR from the commit vialistPullRequestsAssociatedWithCommit(github-script@v9) and exposeshas_skip_label/has_major/has_minor/pr_number/pr_title/pr_urloutputs. Every downstreamgithub.event.pull_request.*reference now reads those outputs; PR-comment steps are guarded onpr_number != ''.[skip ci], so it cannot retrigger the workflow.Action version bumps
actions/setup-pythonv6 → v7,actions/stalev10 → v11. (checkout/setup-node/cache/upload-artifact/github-script/codeql/import-gpg were already current in this repo.)Trunk unit-test upload hardening
Upload Vitest Results(junit-vitest.xml) to the build job andUpload Playwright Results(test-results/junit-playwright.xml) to the playwright job in npm-publish.yml, bothtrunk-io/analytics-uploader@mainwithif: always()andcontinue-on-error: true— telemetry only, a flaky upload must never block a release.playwright.config.tsnow writes its junit report totest-results/junit-playwright.xmlso the uploader and the existingplaywright-resultsartifact both find it. Vitest already emittedjunit-vitest.xmlviavite.config.ts.🤖 Generated with Claude Code