mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-18 12:05:53 +00:00
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.
This commit is contained in:
parent
210c25cf13
commit
9fc47b3d41
3 changed files with 59 additions and 3 deletions
28
.github/workflows/ci.yml
vendored
28
.github/workflows/ci.yml
vendored
|
|
@ -2,9 +2,37 @@ name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "**.go"
|
||||||
|
- "go.mod"
|
||||||
|
- "go.sum"
|
||||||
|
- "**.js"
|
||||||
|
- "**.mjs"
|
||||||
|
- "**.cjs"
|
||||||
|
- "**.ts"
|
||||||
|
- "**.vue"
|
||||||
|
- "**.html"
|
||||||
|
- "**.css"
|
||||||
|
- "frontend/package.json"
|
||||||
|
- "frontend/package-lock.json"
|
||||||
|
- ".nvmrc"
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths:
|
||||||
|
- "**.go"
|
||||||
|
- "go.mod"
|
||||||
|
- "go.sum"
|
||||||
|
- "**.js"
|
||||||
|
- "**.mjs"
|
||||||
|
- "**.cjs"
|
||||||
|
- "**.ts"
|
||||||
|
- "**.vue"
|
||||||
|
- "**.html"
|
||||||
|
- "**.css"
|
||||||
|
- "frontend/package.json"
|
||||||
|
- "frontend/package-lock.json"
|
||||||
|
- ".nvmrc"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
|
||||||
23
.github/workflows/codeql.yml
vendored
23
.github/workflows/codeql.yml
vendored
|
|
@ -4,7 +4,27 @@ on:
|
||||||
push:
|
push:
|
||||||
tags-ignore:
|
tags-ignore:
|
||||||
- "v*"
|
- "v*"
|
||||||
|
paths:
|
||||||
|
- "**.go"
|
||||||
|
- "go.mod"
|
||||||
|
- "go.sum"
|
||||||
|
- "**.js"
|
||||||
|
- "**.mjs"
|
||||||
|
- "**.cjs"
|
||||||
|
- "**.ts"
|
||||||
|
- "**.vue"
|
||||||
|
- "frontend/package-lock.json"
|
||||||
pull_request:
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "**.go"
|
||||||
|
- "go.mod"
|
||||||
|
- "go.sum"
|
||||||
|
- "**.js"
|
||||||
|
- "**.mjs"
|
||||||
|
- "**.cjs"
|
||||||
|
- "**.ts"
|
||||||
|
- "**.vue"
|
||||||
|
- "frontend/package-lock.json"
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "18 2 * * 2"
|
- cron: "18 2 * * 2"
|
||||||
|
|
||||||
|
|
@ -35,9 +55,6 @@ jobs:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
# The Go binary embeds web/dist/ via //go:embed all:dist (web/web.go).
|
|
||||||
# web/dist/ is .gitignored, so CodeQL's autobuild for Go will fail with
|
|
||||||
# "pattern all:dist: no matching files found" unless vite emits it first.
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
if: matrix.language == 'go'
|
if: matrix.language == 'go'
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
|
|
|
||||||
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
|
|
@ -19,6 +19,17 @@ on:
|
||||||
- "x-ui.service.arch"
|
- "x-ui.service.arch"
|
||||||
- "x-ui.service.rhel"
|
- "x-ui.service.rhel"
|
||||||
pull_request:
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "**.js"
|
||||||
|
- "**.css"
|
||||||
|
- "**.html"
|
||||||
|
- "**.sh"
|
||||||
|
- "**.go"
|
||||||
|
- "go.mod"
|
||||||
|
- "go.sum"
|
||||||
|
- "x-ui.service.debian"
|
||||||
|
- "x-ui.service.arch"
|
||||||
|
- "x-ui.service.rhel"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue