mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-31 10:14:15 +00:00
ci: replace legacy frontend path filters with frontend/** glob The CI, CodeQL, and release workflows still gated on a per-extension list (**.js, **.html, **.css, **.cjs, ...) left over from the old Vue/JS UI. That list missed .tsx entirely, so React component edits never triggered the workflows, and carried dead entries like **.cjs. Replace the whole enumeration with a single frontend/** glob in all three so any change under frontend/ triggers build/test/analysis, while keeping **.go, go.mod, go.sum, **.sh, and the service-file paths. @
74 lines
1.6 KiB
YAML
74 lines
1.6 KiB
YAML
name: "CodeQL Advanced"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags-ignore:
|
|
- "v*"
|
|
paths:
|
|
- "**.go"
|
|
- "go.mod"
|
|
- "go.sum"
|
|
- "frontend/**"
|
|
pull_request:
|
|
paths:
|
|
- "**.go"
|
|
- "go.mod"
|
|
- "go.sum"
|
|
- "frontend/**"
|
|
schedule:
|
|
- cron: "18 2 * * 2"
|
|
|
|
jobs:
|
|
analyze:
|
|
name: Analyze (${{ matrix.language }})
|
|
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
|
env:
|
|
CODEQL_ACTION_FILE_COVERAGE_ON_PRS: true
|
|
permissions:
|
|
security-events: write
|
|
packages: read
|
|
actions: read
|
|
contents: read
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- language: actions
|
|
build-mode: none
|
|
- language: go
|
|
build-mode: autobuild
|
|
- language: javascript-typescript
|
|
build-mode: none
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Node.js
|
|
if: matrix.language == 'go'
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
cache-dependency-path: frontend/package-lock.json
|
|
|
|
- name: Build frontend bundle
|
|
if: matrix.language == 'go'
|
|
run: |
|
|
npm ci
|
|
npm run build
|
|
working-directory: frontend
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@v4
|
|
with:
|
|
languages: ${{ matrix.language }}
|
|
build-mode: ${{ matrix.build-mode }}
|
|
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@v4
|
|
with:
|
|
category: "/language:${{matrix.language}}"
|