Skip to content

Commit 1a07ea8

Browse files
authored
Update dotnet.yml
1 parent 3bcdfa1 commit 1a07ea8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/dotnet.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,18 @@ name: .NET CI
66
on:
77
# Run the workflow on all branch pushes and pull requests
88
push:
9-
branches: ["*"]
9+
branches-ignore:
10+
- 'dependabot/**' #avoid duplicates: only run the PR, not the push
11+
- 'gh-pages' #github pages do not trigger all tests
12+
tags-ignore:
13+
- 'v*' #avoid rerun existing commit on release
1014
pull_request:
11-
branches: ["*"]
15+
branches:
16+
- 'main'
1217

1318
jobs:
1419
build:
15-
if: github.event_name != 'push' || github.event.pull_request.merged == false
20+
if: (github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork) || (github.event_name == 'pull_request' && (github.event.pull_request.head.repo.fork || startsWith(github.head_ref, 'dependabot/')))
1621
# Use an Ubuntu-based container to build the project
1722
runs-on: ubuntu-latest
1823

0 commit comments

Comments
 (0)