From 82e35ac889886d4b150db0faeddd48c167995413 Mon Sep 17 00:00:00 2001 From: Jon Ursenbach Date: Fri, 18 Jun 2021 16:45:44 -0700 Subject: [PATCH] ci: upgrading the codeql workflow to the latest way it configs --- .github/workflows/codeql-analysis.yml | 35 +++++++++------------------ 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ac75c306a..8d3b27581 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,8 +1,10 @@ -name: "Code scanning - action" +name: "CodeQL" on: push: + branches: [master] pull_request: + branches: [master] schedule: - cron: '0 12 * * 1' @@ -12,27 +14,14 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v2.3.4 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 + - name: Checkout repository + uses: actions/checkout@v2.3.4 - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: javascript + config-file: ./.github/codeql/config.yml - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: javascript - config-file: ./.github/codeql/config.yml - - - name: Install Dependencies - run: npm ci - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1