From e43ee70c03e41c6bc25b1938a360ccfc33a30319 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Thu, 15 Sep 2022 22:17:03 -0700 Subject: [PATCH] feat: update codeql actions to v2 --- .github/workflows/codeql-analysis.yml | 15 +++------- lib/content/codeql-analysis.yml | 23 +++++--------- .../test/apply/source-snapshots.js.test.cjs | 30 +++++-------------- 3 files changed, 20 insertions(+), 48 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index cfd0db30..9ee98746 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,6 +1,6 @@ # This file is automatically added by @npmcli/template-oss. Do not edit. -name: "CodeQL" +name: CodeQL on: push: @@ -8,7 +8,6 @@ on: - main - latest pull_request: - # The branches below must be a subset of the branches above branches: - main - latest @@ -24,12 +23,6 @@ jobs: actions: read contents: read security-events: write - - strategy: - fail-fast: false - matrix: - language: [ javascript ] - steps: - uses: actions/checkout@v3 - name: Setup git user @@ -37,8 +30,8 @@ jobs: git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: - languages: ${{ matrix.language }} + languages: javascript - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/lib/content/codeql-analysis.yml b/lib/content/codeql-analysis.yml index 382214ff..cb60ef15 100644 --- a/lib/content/codeql-analysis.yml +++ b/lib/content/codeql-analysis.yml @@ -1,4 +1,4 @@ -name: "CodeQL" +name: CodeQL on: push: @@ -7,7 +7,6 @@ on: - {{.}} {{/each}} pull_request: - # The branches below must be a subset of the branches above branches: {{#each branches}} - {{.}} @@ -24,17 +23,11 @@ jobs: actions: read contents: read security-events: write - - strategy: - fail-fast: false - matrix: - language: [javascript] - steps: - {{> setupGit}} - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: $\{{ matrix.language }} - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + {{> setupGit}} + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: javascript + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/tap-snapshots/test/apply/source-snapshots.js.test.cjs b/tap-snapshots/test/apply/source-snapshots.js.test.cjs index 6a316f09..17639e58 100644 --- a/tap-snapshots/test/apply/source-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/source-snapshots.js.test.cjs @@ -291,7 +291,7 @@ jobs: ======================================== # This file is automatically added by @npmcli/template-oss. Do not edit. -name: "CodeQL" +name: CodeQL on: push: @@ -299,7 +299,6 @@ on: - main - latest pull_request: - # The branches below must be a subset of the branches above branches: - main - latest @@ -315,12 +314,6 @@ jobs: actions: read contents: read security-events: write - - strategy: - fail-fast: false - matrix: - language: [ javascript ] - steps: - uses: actions/checkout@v3 - name: Setup git user @@ -328,11 +321,11 @@ jobs: git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: - languages: \${{ matrix.language }} + languages: javascript - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 .github/workflows/post-dependabot.yml ======================================== @@ -1284,7 +1277,7 @@ jobs: ======================================== # This file is automatically added by @npmcli/template-oss. Do not edit. -name: "CodeQL" +name: CodeQL on: push: @@ -1292,7 +1285,6 @@ on: - main - latest pull_request: - # The branches below must be a subset of the branches above branches: - main - latest @@ -1308,12 +1300,6 @@ jobs: actions: read contents: read security-events: write - - strategy: - fail-fast: false - matrix: - language: [ javascript ] - steps: - uses: actions/checkout@v3 - name: Setup git user @@ -1321,11 +1307,11 @@ jobs: git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: - languages: \${{ matrix.language }} + languages: javascript - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 .github/workflows/post-dependabot.yml ========================================