mirror of
https://github.com/iflytek/skillhub.git
synced 2026-08-27 11:14:59 +00:00
fix(ci): remove unsupported Python CodeQL scan
Signed-off-by: dongmucat <1127093059@qq.com>
This commit is contained in:
parent
a85298f7ae
commit
32f34fbf4c
3 changed files with 14 additions and 2 deletions
1
.github/workflows/pr-scripts.yml
vendored
1
.github/workflows/pr-scripts.yml
vendored
|
|
@ -13,6 +13,7 @@ on:
|
|||
- '.github/workflows/pr-tests.yml'
|
||||
- '.github/workflows/security.yml'
|
||||
- '.github/workflows/pr-scripts.yml'
|
||||
- '**/*.py'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
|
|
|||
2
.github/workflows/security.yml
vendored
2
.github/workflows/security.yml
vendored
|
|
@ -50,8 +50,6 @@ jobs:
|
|||
build-mode: manual
|
||||
- language: javascript-typescript
|
||||
build-mode: none
|
||||
- language: python
|
||||
build-mode: none
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
|
|
|
|||
|
|
@ -37,6 +37,17 @@ grep -Fq 'cd server && ./mvnw -q -DskipTests package' "$SECURITY_WORKFLOW" \
|
|||
grep -Fq 'security-events: write' "$SECURITY_WORKFLOW" \
|
||||
|| fail "security workflow must grant SARIF upload permission"
|
||||
|
||||
python_source="$(find "$REPO_ROOT" \
|
||||
\( -path "$REPO_ROOT/.git" -o -path '*/node_modules' -o -path '*/.venv' \) -prune -o \
|
||||
-type f -name '*.py' -print -quit)"
|
||||
if [[ -n "$python_source" ]]; then
|
||||
grep -Fq 'language: python' "$SECURITY_WORKFLOW" \
|
||||
|| fail "security workflow must run Python CodeQL when Python source exists"
|
||||
else
|
||||
! grep -Fq 'language: python' "$SECURITY_WORKFLOW" \
|
||||
|| fail "security workflow must not run Python CodeQL without Python source"
|
||||
fi
|
||||
|
||||
grep -Fq '.github/workflows/security.yml' "$PR_SCRIPTS_WORKFLOW" \
|
||||
|| fail "pr-scripts must run when security workflow changes"
|
||||
grep -Fq '.github/workflows/pr-cli.yml' "$PR_SCRIPTS_WORKFLOW" \
|
||||
|
|
@ -45,6 +56,8 @@ grep -Fq '.github/workflows/pr-e2e.yml' "$PR_SCRIPTS_WORKFLOW" \
|
|||
|| fail "pr-scripts must run when PR E2E workflow changes"
|
||||
grep -Fq '.github/workflows/pr-tests.yml' "$PR_SCRIPTS_WORKFLOW" \
|
||||
|| fail "pr-scripts must run when PR Tests workflow changes"
|
||||
grep -Fq "'**/*.py'" "$PR_SCRIPTS_WORKFLOW" \
|
||||
|| fail "pr-scripts must run when Python source changes"
|
||||
grep -Fq '.env.release.example' "$PR_SCRIPTS_WORKFLOW" \
|
||||
|| fail "pr-scripts must run when release env example changes"
|
||||
grep -Fq '.env.release.draft' "$PR_SCRIPTS_WORKFLOW" \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue