-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add initial codeql analysis action
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 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,51 @@ | ||
name: CodeQL Analysis | ||
|
||
on: [pull_request, push] | ||
|
||
jobs: | ||
analyse: | ||
name: CodeQL Analysis | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
security-events: write | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2.4.1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Retrieve Yarn Cache Directory | ||
id: yarn-cache | ||
run: | | ||
echo "::set-output name=dir::$(yarn cache dir)" | ||
- name: Use Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: ${{ runner.os }}-yarn- | ||
|
||
- name: Install Dependencies | ||
run: | | ||
yarn install --prefer-offline | ||
- name: Build | ||
run: | | ||
yarn clean | ||
yarn build | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |