Skip to content

Commit 20dc832

Browse files
authored
Security - scan artifacts (#28196)
1 parent 7c2fa04 commit 20dc832

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

.github/workflows/codeql.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: 'CodeQL'
22

33
on:
4-
schedule:
5-
- cron: '0 1 * * *'
64
workflow_dispatch:
75

86
jobs:
@@ -17,20 +15,17 @@ jobs:
1715
strategy:
1816
fail-fast: false
1917
matrix:
20-
branch: [ '21_2', '22_1', '22_2' ]
2118
language: [ 'csharp', 'javascript' ]
2219
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
2320
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
2421

2522
steps:
2623
- name: Checkout repository
2724
uses: actions/checkout@v3
28-
with:
29-
ref: ${{ matrix.branch }}
3025

3126
- name: Get head SHA
3227
id: get-head-sha
33-
run: echo "SHA=$(git rev-parse origin/${{ matrix.branch }})" >> "$GITHUB_OUTPUT"
28+
run: echo "SHA=$(git rev-parse origin/${{ github.ref_name }})" >> "$GITHUB_OUTPUT"
3429

3530
# Initializes the CodeQL tools for scanning.
3631
- name: Initialize CodeQL
@@ -46,7 +41,7 @@ jobs:
4641
uses: github/codeql-action/analyze@v2
4742
with:
4843
category: "/language:${{matrix.language}}"
49-
ref: refs/heads/${{ matrix.branch }}
44+
ref: refs/heads/${{ github.ref_name }}
5045
sha: ${{ steps.get-head-sha.outputs.SHA }}
5146

5247
- name: Get Latest Analysis info
@@ -69,8 +64,8 @@ jobs:
6964
id: notify-cache
7065
with:
7166
path: notify.json
72-
key: ${{ runner.os }}-${{ matrix.branch }}-${{ matrix.language }}-${{ steps.get-date.outputs.date }}
73-
restore-keys: ${{ runner.os }}-${{ matrix.branch }}-${{ matrix.language }}
67+
key: ${{ runner.os }}-${{ github.ref_name }}-${{ matrix.language }}-${{ steps.get-date.outputs.date }}
68+
restore-keys: ${{ runner.os }}-${{ github.ref_name }}-${{ matrix.language }}
7469

7570
- name: Teams Notification
7671
uses: DevExpress/github-actions/send-teams-notification@main

0 commit comments

Comments
 (0)