Skip to content

Every pull request runs the full matrix twice, because push is unfiltered #7

Description

@anderix

Every workflow here declares on: push: and on: pull_request: with no branch filter, so a branch that has a pull request open runs the whole matrix twice: once for the push that updated the branch, once for the pull request.

What was measured, 2026-09-18

Seen on excelano/slipcase-open#15, where a two-file change touching no code produced six runs for three workflows — the same commit under two events, twice each. This repository's affected workflows are apple-silicon.yml, ci.yml and windows.yml.

What it costs

The macOS runner bills at ten times a Linux minute and the Windows one at two, and a macOS job that builds, clippies and runs a suite is not cheap. Every pull request pays for it twice, and a branch pushed five times pays for it ten.

What closes it

The filter the rest of the fleet already uses. duckling and segler both declare:

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

A push to a branch that is not main then fires nothing, the pull request event covers the branch, and main is still built on merge. The release and workflow_dispatch triggers are unaffected.

Found on excelano/slipcase-open#15 while merging something else, and this repository is in the same shape.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions