Skip to content

Commit e6bc916

Browse files
committed
btrfs-progs: ci: clean up CodeQL workflow
Remove boilerplate text, reduce commends and keep only the links for future reference. Add branch 'master' for on-push event. Remove scheduled scans, it's run frequently enough on 'devel' push. Signed-off-by: David Sterba <[email protected]>
1 parent 53c8156 commit e6bc916

File tree

1 file changed

+18
-52
lines changed

1 file changed

+18
-52
lines changed

.github/workflows/codeql.yml

Lines changed: 18 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,38 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
1+
# CodeQL security checks (Advanced)
32
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
3+
# Runner size impacts CodeQL analysis time. To learn more, please see:
4+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
5+
# - https://gh.io/supported-runners-and-hardware-resources
6+
# - https://gh.io/using-larger-runners (GitHub.com only)
7+
# - https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
8+
# - https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
9+
# - https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
10+
# - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
611
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
12-
name: "CodeQL Advanced"
12+
# Queries:
13+
# - https://docs.github.com/en/code-security/code-scanning/managing-your-code-scanning-configuration/c-cpp-built-in-queries
14+
15+
name: "CodeQL (Advanced)"
16+
run-name: "CodeQL (Advanced)"
1317

1418
on:
1519
push:
16-
branches: [ "devel" ]
20+
branches: [ "devel", "master" ]
1721
pull_request:
1822
branches: [ "devel" ]
19-
schedule:
20-
- cron: '37 22 * * 0'
2123

2224
jobs:
2325
analyze:
2426
name: Analyze (${{ matrix.language }})
25-
# Runner size impacts CodeQL analysis time. To learn more, please see:
26-
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27-
# - https://gh.io/supported-runners-and-hardware-resources
28-
# - https://gh.io/using-larger-runners (GitHub.com only)
29-
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30-
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
27+
runs-on: ubuntu-latest
3128
permissions:
3229
# required for all workflows
3330
security-events: write
34-
3531
# required to fetch internal or private CodeQL packs
3632
packages: read
37-
3833
# only required for workflows in private repositories
3934
actions: read
4035
contents: read
41-
4236
strategy:
4337
fail-fast: false
4438
matrix:
@@ -47,54 +41,26 @@ jobs:
4741
build-mode: manual
4842
- language: python
4943
build-mode: none
50-
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
51-
# Use `c-cpp` to analyze code written in C, C++ or both
52-
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
53-
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
54-
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
55-
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
56-
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
57-
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
5844
steps:
5945
- name: Checkout repository
6046
uses: actions/checkout@v4
61-
62-
# Add any setup steps before running the `github/codeql-action/init` action.
63-
# This includes steps like installing compilers or runtimes (`actions/setup-node`
64-
# or others). This is typically only required for manual builds.
65-
# - name: Setup runtime (example)
66-
# uses: actions/setup-example@v1
67-
47+
# (Add any setup steps before running the `github/codeql-action/init` action.)
6848
# Initializes the CodeQL tools for scanning.
6949
- name: Initialize CodeQL
7050
uses: github/codeql-action/init@v3
7151
with:
7252
languages: ${{ matrix.language }}
7353
build-mode: ${{ matrix.build-mode }}
74-
# If you wish to specify custom queries, you can do so here or in a config file.
75-
# By default, queries listed here will override any specified in a config file.
76-
# Prefix the list here with "+" to use these queries and those in the config file.
77-
78-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
54+
# (Custom queries)
7955
# queries: security-extended,security-and-quality
80-
8156
- name: Update package cache
8257
run: sudo apt-get update -qqq
8358
- name: Add more build dependencies
8459
run: sudo apt-get install -y liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev
8560

86-
# If the analyze step fails for one of the languages you are analyzing with
87-
# "We were unable to automatically build your code", modify the matrix above
88-
# to set the build mode to "manual" for that language. Then modify this step
89-
# to build your code.
90-
# ℹ️ Command-line programs to run using the OS shell.
91-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
9261
- if: matrix.build-mode == 'manual'
9362
shell: bash
9463
run: |
95-
echo 'If you are using a "manual" build mode for one or more of the' \
96-
'languages you are analyzing, replace this with the commands to build' \
97-
'your code, for example:'
9864
./autogen.sh
9965
./configure --disable-documentation --enable-experimental
10066
make -j 4

0 commit comments

Comments
 (0)