Skip to content

Commit 1178dcb

Browse files
authored
Merge pull request #10293 from tamasvajk/fix/ql4ql-pr-trigger
Workflow: Add paths filter to QL for QL workflow
2 parents b77d77d + 6743051 commit 1178dcb

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/ql-for-ql-build.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ on:
55
branches: [main]
66
pull_request:
77
branches: [main]
8+
paths:
9+
- "ql/**"
10+
- "**.qll"
11+
- "**.ql"
12+
- "**.dbscheme"
13+
- "**/qlpack.yml"
14+
- ".github/workflows/ql-for-ql-build.yml"
815

916
env:
1017
CARGO_TERM_COLOR: always
@@ -54,7 +61,7 @@ jobs:
5461
cp -r ${{ runner.temp }}/queries ${{ runner.temp }}/pack
5562
env:
5663
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
57-
64+
5865
### Build the extractor ###
5966
- name: Cache entire extractor
6067
if: steps.cache-pack.outputs.cache-hit != 'true'
@@ -116,14 +123,14 @@ jobs:
116123
- name: Create CodeQL config file
117124
run: |
118125
echo "paths-ignore:" >> ${CONF}
119-
echo " - ql/ql/test" >> ${CONF}
120-
echo " - \"*/ql/lib/upgrades/\"" >> ${CONF}
126+
echo " - ql/ql/test" >> ${CONF}
127+
echo " - \"*/ql/lib/upgrades/\"" >> ${CONF}
121128
echo "disable-default-queries: true" >> ${CONF}
122129
echo "queries:" >> ${CONF}
123130
echo " - uses: ./ql/ql/src/codeql-suites/ql-code-scanning.qls" >> ${CONF}
124131
echo "Config file: "
125132
cat ${CONF}
126-
env:
133+
env:
127134
CONF: ./ql-for-ql-config.yml
128135
- name: Initialize CodeQL
129136
uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
@@ -139,13 +146,13 @@ jobs:
139146

140147
- name: Perform CodeQL Analysis
141148
uses: github/codeql-action/analyze@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
142-
with:
149+
with:
143150
category: "ql-for-ql"
144151
- name: Copy sarif file to CWD
145152
run: cp ../results/ql.sarif ./ql-for-ql.sarif
146153
- name: Fixup the $scema in sarif # Until https://github.com/microsoft/sarif-vscode-extension/pull/436/ is part in a stable release
147154
run: |
148-
sed -i 's/\$schema.*/\$schema": "https:\/\/raw.githubusercontent.com\/oasis-tcs\/sarif-spec\/master\/Schemata\/sarif-schema-2.1.0",/' ql-for-ql.sarif
155+
sed -i 's/\$schema.*/\$schema": "https:\/\/raw.githubusercontent.com\/oasis-tcs\/sarif-spec\/master\/Schemata\/sarif-schema-2.1.0",/' ql-for-ql.sarif
149156
- name: Sarif as artifact
150157
uses: actions/upload-artifact@v3
151158
with:

0 commit comments

Comments
 (0)