Skip to content

ci: scope push trigger to main to avoid duplicate PR runs#33

Merged
fatihacet merged 1 commit into
mainfrom
ci/scope-push-to-main
Jul 8, 2026
Merged

ci: scope push trigger to main to avoid duplicate PR runs#33
fatihacet merged 1 commit into
mainfrom
ci/scope-push-to-main

Conversation

@fatihacet

Copy link
Copy Markdown
Member

Summary

Opening a PR from a feature branch currently fires CI twice against the same commit — once on the branch push and once on the pull_request event (see PR #32, runs #134 and #135).

Fix

Scope the push trigger to main only:

on:
  push:
    branches: [main]   # was ['**']
    tags: ['*']        # unchanged — release tag builds still publish
  pull_request:
    branches: [main]
  • Feature branches are already validated by the pull_request trigger, so each PR now runs CI exactly once.
  • main still builds post-merge.
  • tags: ['*'] is left intact, so version-tag release builds (GCS + GitHub Releases dual-publish) are unaffected.

The push trigger matched every branch (`branches: ['**']`), so opening a
PR from a feature branch fired CI twice: once on the branch push and once
on the pull_request event, both against the same commit.

Restrict push to `branches: [main]` (post-merge builds) while keeping
`tags: ['*']` intact so release tag builds still publish. Feature-branch
validation is fully covered by the existing pull_request trigger, so each
PR now runs CI exactly once.
@kaicontext

kaicontext Bot commented Jul 8, 2026

Copy link
Copy Markdown

🔍 Kai review

Kai analyzed this pull request and posted a verification review.

View the finding →

@fatihacet fatihacet merged commit 997031b into main Jul 8, 2026
5 checks passed
@fatihacet fatihacet deleted the ci/scope-push-to-main branch July 8, 2026 20:05
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