Skip to content

Commit 5dca7cd

Browse files
authored
Merge pull request #143 from microsoft/dilan/powershell-pr-check
PowerShell PR Check
2 parents 861ae8a + 44e48a7 commit 5dca7cd

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: PowerShell PR Check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- "powershell/**"
9+
workflow_dispatch:
10+
11+
jobs:
12+
powershell-pr-check:
13+
name: powershell-pr-check
14+
runs-on: ubuntu-latest
15+
if: github.repository == 'microsoft/codeql'
16+
permissions:
17+
contents: write
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
23+
token: ${{ secrets.WORKFLOW_TOKEN }}
24+
- name: Setup CodeQL
25+
uses: ./.github/actions/fetch-codeql
26+
- name: Compile PowerShell Queries
27+
run: |
28+
codeql query compile --check-only --keep-going powershell/ql/src

.github/workflows/sync-main.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,22 @@ jobs:
2121
run: |
2222
git config user.name Dilan Bhalla
2323
git config user.email [email protected]
24-
- name: Fetch
24+
- name: Sync Main
2525
shell: bash
2626
run: |
2727
set -x
2828
git fetch
2929
git remote add upstream https://github.com/github/codeql.git
3030
git fetch upstream --tags --force
31-
- name: Sync Main
31+
git merge codeql-cli/latest
32+
- name: Setup CodeQL
33+
uses: ./.github/actions/fetch-codeql
34+
- name: Compile PowerShell Queries
35+
run: |
36+
codeql query compile --check-only --keep-going powershell/ql/src
37+
- name: Complete Sync
3238
shell: bash
3339
run: |
34-
git merge codeql-cli/latest
3540
git push origin main
3641
git push origin --tags --force
3742

0 commit comments

Comments
 (0)