Move code scanning to its own actions file

- It can work and only work on `pull_request`, not `pull_request_target`
This commit is contained in:
Dominion
2023-06-07 08:03:42 -04:00
parent 5824ccc1f5
commit 12f878028d
2 changed files with 44 additions and 38 deletions
-38
View File
@@ -55,44 +55,6 @@ jobs:
- name: GitHub Requires at Least One Step for a Job
run: exit 0
analyze:
name: Code Scanning
needs: start-ci-run-gate
if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'"
runs-on: ubuntu-latest
steps:
- name: Install Node 12.X
uses: actions/setup-node@v3
with:
node-version: 12.x
- name: Upgrade NPM
run: npm install -g npm
- name: Checkout (Branch Push)
uses: actions/checkout@v3
if: github.event_name == 'push'
with:
fetch-depth: 2
- name: Checkout (PR Merge)
uses: actions/checkout@v3
if: github.event_name != 'push'
with:
fetch-depth: 2
ref: "refs/pull/${{ github.event.number }}/merge"
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: csharp
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
dmapi-build:
name: Build DMAPI
needs: start-ci-run-gate
+44
View File
@@ -0,0 +1,44 @@
name: 'Code Scanning'
on:
schedule:
- cron: 0 23 * * *
push:
branches:
- dev
- master
pull_request:
branches:
- dev
- master
concurrency:
group: "code-scanning-${{ github.head_ref || github.run_id }}-${{ github.event_name }}"
cancel-in-progress: true
jobs:
analyze:
name: Code Scanning
runs-on: ubuntu-latest
steps:
- name: Install Node 12.X
uses: actions/setup-node@v3
with:
node-version: 12.x
- name: Upgrade NPM
run: npm install -g npm
- name: Checkout
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: csharp
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2