Skip to content

Commit

Permalink
feat: add initial codeql analysis action
Browse files Browse the repository at this point in the history
  • Loading branch information
eels committed Oct 27, 2021
1 parent 5f55090 commit 84f85a5
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/codeql-analysis.yml
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

0 comments on commit 84f85a5

Please sign in to comment.