Skip to content

ci: run on pull requests only, not on pushes to master - #11

Merged
tieuanhquoc merged 1 commit into
masterfrom
ci/pr-only
Oct 5, 2026
Merged

tieuanhquoc merged 1 commit into
masterfrom
ci/pr-only

Conversation

@tieuanhquoc

Copy link
Copy Markdown
Collaborator

Summary

CI ran twice for every change: once on the PR, then again on master after merging. The second run only rebuilt code that had just passed.

  • ci.yml: triggers on pull_request and workflow_dispatch only. The branch ruleset (required build-and-test, strict "up to date" policy, squash-only) already guarantees master gets exactly the tested code.
  • Change detection simplified to the PR base; manual runs always build.
  • README CI badge uses ?event=pull_request so it tracks PR runs instead of freezing on the last master run.
  • Releases (release.yml, on v* tags) still run the full test suite before packaging — unchanged.

Test plan

  • Workflow YAML parses; triggers = pull_request, workflow_dispatch.
  • Badge URL with ?event=pull_request responds 200.
  • This PR's own run (it edits ci.yml, so it builds once).
  • After merge: no CI run on master.

🤖 Generated with Claude Code

The branch ruleset only merges PRs that are up to date with master and
passed build-and-test, so master receives exactly the code CI already
checked; the post-merge run rebuilt it for nothing. CI now runs on pull
requests and by hand. Releases still test before packaging.

The README CI badge now reflects pull-request runs (it would otherwise
stay frozen on the last master run).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

Deploying dockz with  Cloudflare Pages  Cloudflare Pages

Latest commit: 53a0126
Status: ✅  Deploy successful!
Preview URL: https://cae4f396.dockz.pages.dev
Branch Preview URL: https://ci-pr-only.dockz.pages.dev

View logs

@tieuanhquoc
tieuanhquoc merged commit 9dbd510 into master Oct 5, 2026
3 checks passed
@tieuanhquoc
tieuanhquoc deleted the ci/pr-only branch October 5, 2026 08:24
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