-
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.06 KB
/
ci-gate.yml
File metadata and controls
43 lines (38 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: CI Gate
# Always runs - provides status checks for branch protection when other workflows are skipped
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check-changes:
runs-on: ubuntu-latest
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
code:
- '**.cs'
- '**.csproj'
- '**.sln'
- 'Directory.Build.props'
- 'Directory.Packages.props'
- 'nuget.config'
# These jobs satisfy branch protection when code workflows are skipped
build-status:
runs-on: ubuntu-latest
needs: check-changes
if: needs.check-changes.outputs.code != 'true'
steps:
- run: echo "No code changes - build not required"
test-status:
runs-on: ubuntu-latest
needs: check-changes
if: needs.check-changes.outputs.code != 'true'
steps:
- run: echo "No code changes - tests not required"