-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (43 loc) · 1.29 KB
/
on-pull-request.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
41
42
43
44
45
46
47
48
---
name: CI for pull requests
"on":
pull_request:
jobs:
judge-exec:
outputs:
needs-test-go: ${{ steps.judge-needs-test-go.outputs.any_changed }}
needs-lint-markdown: ${{ steps.judge-needs-lint-markdown.outputs.any_changed }}
needs-lint-yaml: ${{ steps.judge-needs-lint-yaml.outputs.any_changed }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: judge-needs-test-go
uses: tj-actions/changed-files@v37
with:
files: |
**/*.go
go.mod
go.sum
.github/workflows/task-test-go.yml
- id: judge-needs-lint-markdown
uses: tj-actions/changed-files@v37
with:
files: |
**/*.md
- id: judge-needs-lint-yaml
uses: tj-actions/changed-files@v37
with:
files: |
**/*.y{,a}ml
test-go:
needs: judge-exec
if: needs.judge-exec.outputs.needs-test-go == 'true'
uses: ./.github/workflows/task-test-go.yml
lint-markdown:
needs: judge-exec
if: needs.judge-exec.outputs.needs-lint-markdown == 'true'
uses: ./.github/workflows/task-lint-markdown.yml
lint-yaml:
needs: judge-exec
if: needs.judge-exec.outputs.needs-lint-yaml == 'true'
uses: ./.github/workflows/task-lint-yaml.yml