-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (33 loc) · 963 Bytes
/
main.yml
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
name: main
# PR checks
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
pull_request_review:
types: [submitted]
workflow_dispatch:
concurrency:
group: main-${{ github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
partial_checks:
if: github.event_name == 'pull_request' && !github.event.pull_request.draft
uses: ./.github/workflows/main_partial.yml
full_checks:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request_review' && github.event.review.state == 'approved'
uses: ./.github/workflows/main_full.yml
common_checks:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
permissions:
# For golangci-lint
contents: read
pull-requests: read
checks: write
uses: ./.github/workflows/main_common.yml