Skip to content

Commit db8575f

Browse files
committed
Use our container for the CodeQL job
Also upgraded to the latest versions for the actions and did some small cleanup to make the code more readable. The $USER is now set close to where we start the container as we use this in code and GHA didn't set this. Our container already has the packages so we don't need to run the apt steps anymore (for the speedup). Run CI with our container for speedup
1 parent 05f5924 commit db8575f

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ on:
1212

1313
jobs:
1414
analyze:
15-
# We can not run with our gitlab container
16-
# CodeQL has missing .so files otherwise
15+
container:
16+
image: domjudge/gitlabci:24.04
17+
options: --user domjudge
1718
name: Analyze
1819
runs-on: ubuntu-latest
1920
env:
2021
COMPILED: "cpp"
22+
USER: "domjudge"
2123
permissions:
2224
actions: read
2325
contents: read
@@ -33,27 +35,13 @@ jobs:
3335
uses: actions/checkout@v4
3436

3537
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@v2
38+
uses: github/codeql-action/init@v3
3739
with:
3840
languages: ${{ matrix.language }}
3941

40-
- name: Install required tools
41-
if: ${{ contains(env.COMPILED, matrix.language) }}
42-
run: |
43-
sudo apt update
44-
sudo apt install -y acl zip unzip apache2 composer php php-fpm php-gd \
45-
php-cli php-intl php-mbstring php-mysql php-curl php-json \
46-
php-xml php-zip ntp make sudo debootstrap \
47-
libcgroup-dev lsof php-cli php-curl php-json php-xml \
48-
php-zip procps gcc g++ default-jre-headless \
49-
default-jdk-headless ghc fp-compiler autoconf automake bats \
50-
python3-sphinx python3-sphinx-rtd-theme rst2pdf fontconfig \
51-
python3-yaml latexmk
52-
5342
- name: Install composer files
5443
if: ${{ contains(env.COMPILED, matrix.language) }}
55-
run: |
56-
composer install --no-scripts
44+
run: composer install --no-scripts
5745

5846
- name: Configure Makefile
5947
if: ${{ contains(env.COMPILED, matrix.language) }}
@@ -88,4 +76,4 @@ jobs:
8876
run: sudo chown -R ${USER} ./installdir
8977

9078
- name: Perform CodeQL Analysis
91-
uses: github/codeql-action/analyze@v2
79+
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)