Skip to content

Commit 9fc47b3

Browse files
committed
ci: gate workflows on relevant source paths
- ci.yml: only run on Go/frontend source and lockfiles. - codeql.yml: scope push/PR triggers to Go and JS/TS sources; weekly cron still does a full scan. - release.yml: add matching paths allowlist to pull_request so doc/workflow-only PRs don't kick off the multi-arch build. Skips workflow runs on changes to docs, translations, GitHub configs, and unrelated scripts.
1 parent 210c25c commit 9fc47b3

3 files changed

Lines changed: 59 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,37 @@ name: CI
22

33
on:
44
pull_request:
5+
paths:
6+
- "**.go"
7+
- "go.mod"
8+
- "go.sum"
9+
- "**.js"
10+
- "**.mjs"
11+
- "**.cjs"
12+
- "**.ts"
13+
- "**.vue"
14+
- "**.html"
15+
- "**.css"
16+
- "frontend/package.json"
17+
- "frontend/package-lock.json"
18+
- ".nvmrc"
519
push:
620
branches:
721
- main
22+
paths:
23+
- "**.go"
24+
- "go.mod"
25+
- "go.sum"
26+
- "**.js"
27+
- "**.mjs"
28+
- "**.cjs"
29+
- "**.ts"
30+
- "**.vue"
31+
- "**.html"
32+
- "**.css"
33+
- "frontend/package.json"
34+
- "frontend/package-lock.json"
35+
- ".nvmrc"
836

937
permissions:
1038
contents: read

.github/workflows/codeql.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,27 @@ on:
44
push:
55
tags-ignore:
66
- "v*"
7+
paths:
8+
- "**.go"
9+
- "go.mod"
10+
- "go.sum"
11+
- "**.js"
12+
- "**.mjs"
13+
- "**.cjs"
14+
- "**.ts"
15+
- "**.vue"
16+
- "frontend/package-lock.json"
717
pull_request:
18+
paths:
19+
- "**.go"
20+
- "go.mod"
21+
- "go.sum"
22+
- "**.js"
23+
- "**.mjs"
24+
- "**.cjs"
25+
- "**.ts"
26+
- "**.vue"
27+
- "frontend/package-lock.json"
828
schedule:
929
- cron: "18 2 * * 2"
1030

@@ -35,9 +55,6 @@ jobs:
3555
- name: Checkout repository
3656
uses: actions/checkout@v6
3757

38-
# The Go binary embeds web/dist/ via //go:embed all:dist (web/web.go).
39-
# web/dist/ is .gitignored, so CodeQL's autobuild for Go will fail with
40-
# "pattern all:dist: no matching files found" unless vite emits it first.
4158
- name: Setup Node.js
4259
if: matrix.language == 'go'
4360
uses: actions/setup-node@v6

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ on:
1919
- "x-ui.service.arch"
2020
- "x-ui.service.rhel"
2121
pull_request:
22+
paths:
23+
- "**.js"
24+
- "**.css"
25+
- "**.html"
26+
- "**.sh"
27+
- "**.go"
28+
- "go.mod"
29+
- "go.sum"
30+
- "x-ui.service.debian"
31+
- "x-ui.service.arch"
32+
- "x-ui.service.rhel"
2233

2334
jobs:
2435
build:

0 commit comments

Comments
 (0)