File tree 4 files changed +59
-51
lines changed
4 files changed +59
-51
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- name : files changed
1
+ name : files- changed
2
2
3
3
on :
4
4
workflow_call :
5
5
outputs :
6
- docs :
7
- description : " whether docs files changed"
8
- value : ${{ jobs.files-changed.outputs.docs }}
9
6
backend :
10
7
description : " whether backend files changed"
11
- value : ${{ jobs.files-changed .outputs.backend }}
8
+ value : ${{ jobs.detect .outputs.backend }}
12
9
frontend :
13
10
description : " whether frontend files changed"
14
- value : ${{ jobs.files-changed.outputs.frontend }}
11
+ value : ${{ jobs.detect.outputs.frontend }}
12
+ docs :
13
+ description : " whether docs files changed"
14
+ value : ${{ jobs.detect.outputs.docs }}
15
+ actions :
16
+ description : " whether actions files changed"
17
+ value : ${{ jobs.detect.outputs.actions }}
15
18
16
19
jobs :
17
- files-changed :
20
+ detect :
18
21
name : detect which files changed
19
22
runs-on : ubuntu-latest
20
23
timeout-minutes : 3
21
24
# Map a step output to a job output
22
25
outputs :
23
- docs : ${{ steps.changes.outputs.docs }}
24
26
backend : ${{ steps.changes.outputs.backend }}
25
27
frontend : ${{ steps.changes.outputs.frontend }}
28
+ docs : ${{ steps.changes.outputs.docs }}
29
+ actions : ${{ steps.changes.outputs.actions }}
26
30
steps :
27
31
- uses : actions/checkout@v3
28
- - name : Check for backend file changes
29
- uses : dorny/paths-filter@v2
32
+ - uses : dorny/paths-filter@v2
30
33
id : changes
31
34
with :
32
- filters : .github/file-filters.yml
35
+ filters : |
36
+ backend:
37
+ - "**/*.go"
38
+ - "**/*.tmpl"
39
+ - "go.mod"
40
+ - "go.sum"
41
+
42
+ frontend:
43
+ - "**/*.js"
44
+ - "web_src/**"
45
+ - "package.json"
46
+ - "package-lock.json"
47
+
48
+ docs:
49
+ - "**/*.md"
50
+ - "docs/**"
51
+
52
+ actions:
53
+ - ".github/workflows/*"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 25
25
- run : make lint-backend
26
26
env :
27
27
TAGS : bindata sqlite sqlite_unlock_notify
28
+
28
29
lint-go-windows :
29
30
if : needs.files-changed.outputs.backend == 'true'
30
31
needs : files-changed
41
42
TAGS : bindata sqlite sqlite_unlock_notify
42
43
GOOS : windows
43
44
GOARCH : amd64
45
+
44
46
lint-go-gogit :
45
47
if : needs.files-changed.outputs.backend == 'true'
46
48
needs : files-changed
55
57
- run : make lint-go
56
58
env :
57
59
TAGS : bindata gogit sqlite sqlite_unlock_notify
60
+
58
61
checks-backend :
59
62
if : needs.files-changed.outputs.backend == 'true'
60
63
needs : files-changed
67
70
check-latest : true
68
71
- run : make deps-backend deps-tools
69
72
- run : make --always-make checks-backend # ensure the "go-licenses" make target runs
73
+
70
74
frontend :
71
75
if : needs.files-changed.outputs.frontend == 'true'
72
76
needs : files-changed
79
83
- run : make deps-frontend
80
84
- run : make lint-frontend
81
85
- run : make checks-frontend
86
+
82
87
backend :
83
88
if : needs.files-changed.outputs.backend == 'true'
84
89
needs : files-changed
@@ -113,3 +118,25 @@ jobs:
113
118
env :
114
119
GOOS : linux
115
120
GOARCH : 386
121
+
122
+ docs :
123
+ if : needs.files-changed.outputs.docs == 'true'
124
+ needs : files-changed
125
+ runs-on : ubuntu-latest
126
+ steps :
127
+ - uses : actions/checkout@v3
128
+ - uses : actions/setup-node@v3
129
+ with :
130
+ node-version : 20
131
+ - run : make deps-frontend
132
+ - run : make lint-md
133
+ - run : make docs # test if build could succeed
134
+
135
+ actions :
136
+ if : needs.files-changed.outputs.actions == 'true'
137
+ needs : files-changed
138
+ runs-on : ubuntu-latest
139
+ steps :
140
+ - uses : actions/checkout@v3
141
+ - uses : actions/setup-go@v4
142
+ - run : make lint-actions
You can’t perform that action at this time.
0 commit comments