-
Notifications
You must be signed in to change notification settings - Fork 77
76 lines (68 loc) · 2.3 KB
/
main.yml
File metadata and controls
76 lines (68 loc) · 2.3 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Build application
on:
push:
branches:
- master
pull_request:
types: [opened, edited, synchronize, reopened]
merge_group:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: >-
${{ github.ref != 'refs/heads/master' &&
github.event_name != 'merge_group' &&
!startsWith(github.ref, 'refs/heads/gh-readonly-queue') }}
jobs:
pr_title:
name: PR Title Gate
runs-on: ubuntu-latest
steps:
- name: Non-PR event — skip title validation
if: ${{ github.event_name != 'pull_request' }}
run: echo "Not a PR event; skipping title check"
- name: Checkout
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v4
- name: Set up Python
if: ${{ github.event_name == 'pull_request' }}
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Validate PR title
if: ${{ github.event_name == 'pull_request' }}
run: python .github/scripts/validate_pr.py
pre-commit:
if: ${{ github.event_name != 'pull_request' || github.event.action != 'edited' || github.event.changes.title }}
needs:
- pr_title
uses: ./.github/workflows/pre-commit.yml
ubuntu:
if: ${{ github.event_name != 'pull_request' || github.event.action != 'edited' || github.event.changes.title }}
needs:
- pre-commit
uses: ./.github/workflows/ubuntu.yml
mac:
if: ${{ github.event_name != 'pull_request' || github.event.action != 'edited' || github.event.changes.title }}
needs:
- pre-commit
uses: ./.github/workflows/mac.yml
windows:
if: ${{ github.event_name != 'pull_request' || github.event.action != 'edited' || github.event.changes.title }}
needs:
- pre-commit
uses: ./.github/workflows/windows.yml
perf:
if: ${{ github.event_name != 'pull_request' || github.event.action != 'edited' || github.event.changes.title }}
needs:
- ubuntu
- mac
- windows
uses: ./.github/workflows/perf.yml
pages:
if: ${{ github.event_name != 'pull_request' || github.event.action != 'edited' || github.event.changes.title }}
needs:
- perf
uses: ./.github/workflows/pages.yml