Skip to content

ci: stop double-running test workflows on PR branches#181

Merged
reuvenharrison merged 1 commit into
mainfrom
ci/dedupe-workflow-runs
Jun 27, 2026
Merged

ci: stop double-running test workflows on PR branches#181
reuvenharrison merged 1 commit into
mainfrom
ci/dedupe-workflow-runs

Conversation

@reuvenharrison

Copy link
Copy Markdown
Contributor

Problem

All seven test-* workflows triggered on both push and pull_request with no branch filter:

on:
  pull_request:
  push:

So every push to a PR branch fires both events, running each workflow twice.

Fix

Restrict push to main (same change just applied to oasdiff):

on:
  push:
    branches: [main]
  pull_request:
  • PR branch pushes now trigger only pull_request (one run).
  • A merge to main triggers only push (one run).
  • pull_request stays unfiltered so PRs against any base branch still run.

No coverage lost: every change runs on its PR and again on main after merge. Roughly halves Actions usage across these seven workflows.

All seven test-* workflows triggered on both push and pull_request with no
branch filter, so every push to a PR branch fired both events: two runs each.
Restrict push to main: PR branches now trigger only pull_request, and a merge to
main triggers only push. pull_request stays unfiltered so PRs against any base
still run. Roughly halves Actions usage for these workflows.
@reuvenharrison reuvenharrison merged commit 7dbfe30 into main Jun 27, 2026
31 checks passed
@reuvenharrison reuvenharrison deleted the ci/dedupe-workflow-runs branch June 27, 2026 07:08
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