-
Notifications
You must be signed in to change notification settings - Fork 55
31 lines (26 loc) · 961 Bytes
/
codeql-analysis.yml
File metadata and controls
31 lines (26 loc) · 961 Bytes
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
name: "CodeQL"
on: [ pull_request, workflow_dispatch ]
jobs:
lint:
name: CodeQL
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
path: database
- name: Checkout query library
uses: actions/checkout@v4
with:
repository: utopia-php/query
path: query
- run: git checkout HEAD^2
if: github.event_name == 'pull_request'
working-directory: database
- name: Run CodeQL
run: |
docker run --rm -v $PWD/database:/app -v $PWD/query:/query -w /app -e COMPOSER_MIRROR_PATH_REPOS=1 phpswoole/swoole:5.1.8-php8.3-alpine sh -c \
"sed -i 's|\"url\": \"../query\"|\"url\": \"/query\"|' composer.json && \
sed -i 's|\"symlink\": true|\"symlink\": false|' composer.json && \
composer install --profile --ignore-platform-reqs && composer check"