Skip to content

Commit 1bd257f

Browse files
committed
ci: redistribute canonical codeql.yml (concurrency-cancel guard) (Refs hyperpolymath/standards#122)
1 parent e595159 commit 1bd257f

1 file changed

Lines changed: 3 additions & 22 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PMPL-1.0-or-later
1+
# SPDX-License-Identifier: PMPL-1.0
22
name: CodeQL Security Analysis
33

44
on:
@@ -37,32 +37,13 @@ jobs:
3737
- name: Checkout
3838
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3939

40-
# This repo is a declarative grammar extension with no JS/TS sources.
41-
# CodeQL errors out ("no code found") when there is nothing to scan,
42-
# so detect presence first and skip cleanly when absent. The step
43-
# stays here so analysis activates automatically if JS/TS is added.
44-
- name: Detect JavaScript/TypeScript sources
45-
id: detect
46-
run: |
47-
if find . -path ./.git -prune -o -type f \
48-
\( -name '*.ts' -o -name '*.tsx' -o -name '*.js' \
49-
-o -name '*.jsx' -o -name '*.mjs' -o -name '*.cjs' \) \
50-
-print | grep -q .; then
51-
echo "present=true" >> "$GITHUB_OUTPUT"
52-
else
53-
echo "present=false" >> "$GITHUB_OUTPUT"
54-
echo "::notice::No JavaScript/TypeScript sources found — skipping CodeQL analysis."
55-
fi
56-
5740
- name: Initialize CodeQL
58-
if: steps.detect.outputs.present == 'true'
59-
uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.28.1
41+
uses: github/codeql-action/init@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3
6042
with:
6143
languages: ${{ matrix.language }}
6244
build-mode: ${{ matrix.build-mode }}
6345

6446
- name: Perform CodeQL Analysis
65-
if: steps.detect.outputs.present == 'true'
66-
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.28.1
47+
uses: github/codeql-action/analyze@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3
6748
with:
6849
category: "/language:${{ matrix.language }}"

0 commit comments

Comments
 (0)