Skip to content

Commit 09eefe7

Browse files
committed
.github: trim number of runners started on push + pr
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent dc17b1a commit 09eefe7

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@ on:
88
- '**'
99
- '!dev'
1010
pull_request:
11-
branches:
12-
- '**'
11+
types: [opened, synchronize, reopened, labeled]
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
15+
cancel-in-progress: true
1316

1417
jobs:
1518
build:
1619
# Verify we can build on latest Ubuntu with both gcc and clang
1720
name: ${{ matrix.compiler }}
1821
runs-on: ubuntu-latest
22+
# Skip redundant builds for PRs - prefer PR builds over push builds
23+
if: github.event_name != 'push' || github.ref == 'refs/heads/master'
1924
strategy:
2025
matrix:
2126
compiler: [gcc, clang]

.github/workflows/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ name: Dotty the Documenteer
22

33
on:
44
push:
5+
branches:
6+
- master
57
paths:
68
- 'doc/**'
79
- 'README.md'
810
- 'mkdocs.yml'
911
- '.github/workflows/docs.yml'
1012
pull_request:
13+
types: [opened, synchronize, reopened, labeled]
1114
paths:
1215
- 'doc/**'
1316
- 'README.md'

0 commit comments

Comments
 (0)