forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from microsoft/dilan/powershell-pr-check
PowerShell PR Check
- Loading branch information
Showing
2 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: PowerShell PR Check | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "powershell/**" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
powershell-pr-check: | ||
name: powershell-pr-check | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'microsoft/codeql' | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.WORKFLOW_TOKEN }} | ||
- name: Setup CodeQL | ||
uses: ./.github/actions/fetch-codeql | ||
- name: Compile PowerShell Queries | ||
run: | | ||
codeql query compile --check-only --keep-going powershell/ql/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,17 +21,22 @@ jobs: | |
run: | | ||
git config user.name Dilan Bhalla | ||
git config user.email [email protected] | ||
- name: Fetch | ||
- name: Sync Main | ||
shell: bash | ||
run: | | ||
set -x | ||
git fetch | ||
git remote add upstream https://github.com/github/codeql.git | ||
git fetch upstream --tags --force | ||
- name: Sync Main | ||
git merge codeql-cli/latest | ||
- name: Setup CodeQL | ||
uses: ./.github/actions/fetch-codeql | ||
- name: Compile PowerShell Queries | ||
run: | | ||
codeql query compile --check-only --keep-going powershell/ql/src | ||
- name: Complete Sync | ||
shell: bash | ||
run: | | ||
git merge codeql-cli/latest | ||
git push origin main | ||
git push origin --tags --force | ||