Skip to content

Commit eb47546

Browse files
authored
Run the main build on every push to main, not just root-file pushes (#2238)
main.yml filtered pushes with paths: - '*' - '!/docs/*' GitHub's `*` does not cross a '/', so `'*'` matches only files at the repository root. Any push touching just Dapper/, tests/ or another subdirectory failed the filter and the build was skipped - silently, because a skipped workflow is not a failure. Checking main: 8becae8 (#2230) 4 root files ran 2ca8261 (#2223) 1 root file ran 6d48ef6 (#2228) 0 root files skipped 41d76c7 (#2225) 0 root files skipped So most merges to main never built at all. The second line never worked either: path filters are repo-relative and take no leading slash, so '!/docs/*' matched nothing - the docs exclusion it was written for was already being done, by accident, by the '*' that excluded every subdirectory. paths-ignore: 'docs/**' says what was meant: run for everything except a docs-only change. This matters more than it used to. release.yml takes its version from what a green main run reports, so a main build that never runs means no version to tag with - which is how this was noticed.
1 parent d970cf2 commit eb47546

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ on:
66
push:
77
branches:
88
- main
9-
paths:
10-
- '*'
11-
- '!/docs/*' # Don't run workflow when files are only in the /docs directory
9+
# paths-ignore, not paths: a `paths` list of '*' matches only root-level files, because
10+
# GitHub's `*` does not cross a '/'. That silently skipped main builds for every push that
11+
# touched only Dapper/, tests/ and so on - which is most of them
12+
paths-ignore:
13+
- 'docs/**' # don't run when only the docs site changed
1214

1315
jobs:
1416
vm-job:

0 commit comments

Comments
 (0)