-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.14 KB
/
check-codeql.yml
File metadata and controls
42 lines (34 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# .github/workflows/check-codeql.yml
#
# Copyright © 2025-2026 Network Pro Strategies (Network Pro™)
# SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
# This file is part of Network Pro
name: CodeQL Status Check
permissions:
actions: read
contents: read
on:
workflow_call:
jobs:
check:
name: Check CodeQL Status
runs-on: ubuntu-24.04
env:
ENV_MODE: ci
steps:
- name: Check CodeQL Workflow
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh --version
if ! gh run list --repo "${GITHUB_REPOSITORY}" --workflow "CodeQL" --limit 1 --json conclusion --jq '.[0].conclusion' > codeql_status.txt; then
echo "::error title=CodeQL Check Failed::Could not retrieve CodeQL run status. Blocking deployment."
exit 1
fi
CODEQL_STATUS=$(cat codeql_status.txt)
echo "CodeQL status: $CODEQL_STATUS"
if [[ "$CODEQL_STATUS" != "success" ]]; then
echo "::error title=CodeQL Check Failed::Latest CodeQL run did not succeed. Blocking deployment."
exit 1
fi
rm -f codeql_status.txt