Skip to content

Commit 8a97f47

Browse files
committed
(build) validate code format on all commits not only PRs
1 parent b43b3ba commit 8a97f47

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/workflows/format.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
name: Validate PR
1+
name: Validate Commit
22

3-
on: [pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- 'fix/*'
8+
- 'feature/*'
9+
10+
pull_request:
11+
branches:
12+
- master
413

514
jobs:
615
format:
716
runs-on: ubuntu-latest
817
name: DotNet Format
918
steps:
1019
- uses: actions/checkout@v2
11-
12-
# workaround for dotnet tools not being on path https://github.com/actions/virtual-environments/issues/213
13-
- name: add .dotnet/tools to path
14-
run: echo "::set-env name=PATH::${PATH}:${HOME}/.dotnet/tools"
15-
1620
- run: dotnet tool install -g dotnet-format
17-
1821
- run: dotnet format ./ --folder --check --exclude **/AddFormats/

0 commit comments

Comments
 (0)