|
1 |
| -# For most projects, this workflow file will not need changing; you simply need |
2 |
| -# to commit it to your repository. |
3 |
| -# |
4 |
| -# You may wish to alter this file to override the set of languages analyzed, |
5 |
| -# or to provide custom queries or build logic. |
6 |
| -name: codeql |
| 1 | + |
| 2 | +name: CodeQL |
| 3 | + |
7 | 4 | on:
|
8 | 5 | push:
|
9 | 6 | branches: [main, develop]
|
10 | 7 | pull_request:
|
11 |
| - branches: [main] |
| 8 | + branches: [main, develop] |
12 | 9 | schedule:
|
13 |
| - - cron: '0 11 * * 2' |
| 10 | + # ┌───────────── minute (0 - 59) |
| 11 | + # │ ┌───────────── hour (0 - 23) |
| 12 | + # │ │ ┌───────────── day of the month (1 - 31) |
| 13 | + # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) |
| 14 | + # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) |
| 15 | + # │ │ │ │ │ |
| 16 | + # * * * * * |
| 17 | + - cron: '30 1 * * 0' |
14 | 18 |
|
15 | 19 | jobs:
|
16 |
| - analyze: |
17 |
| - name: analyze |
| 20 | + CodeQL-Build: |
| 21 | + # CodeQL runs on ubuntu-latest, windows-latest, and macos-latest |
18 | 22 | runs-on: ubuntu-latest
|
19 |
| - strategy: |
20 |
| - fail-fast: false |
21 |
| - matrix: |
22 |
| - # Override automatic language detection by changing the below list |
23 |
| - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] |
24 |
| - language: ['go'] |
| 23 | + |
| 24 | + permissions: |
| 25 | + # required for all workflows |
| 26 | + security-events: write |
| 27 | + |
| 28 | + # only required for workflows in private repositories |
| 29 | + actions: read |
| 30 | + contents: read |
| 31 | + |
25 | 32 | steps:
|
26 |
| - - name: checkout repository |
27 |
| - uses: actions/checkout@v2 |
28 |
| - with: |
29 |
| - # We must fetch at least the immediate parents so that if this is |
30 |
| - # a pull request then we can checkout the head. |
31 |
| - fetch-depth: 2 |
32 |
| - |
33 |
| - # If this run was triggered by a pull request event, then checkout |
34 |
| - # the head of the pull request instead of the merge commit. |
35 |
| - - run: git checkout HEAD^2 |
36 |
| - if: ${{ github.event_name == 'pull_request' }} |
| 33 | + - name: Checkout repository |
| 34 | + uses: actions/checkout@v3 |
37 | 35 |
|
38 | 36 | # Initializes the CodeQL tools for scanning.
|
39 |
| - - name: initialize CodeQL |
40 |
| - uses: github/codeql-action/init@v1 |
41 |
| - with: |
42 |
| - languages: ${{ matrix.language }} |
43 |
| - |
44 |
| - # Auto-build attempts to build any compiled languages (C/C++, C#, or Java). |
45 |
| - # If this step fails, then you should remove it and run the build manually (see below) |
46 |
| - - name: auto-build |
47 |
| - uses: github/codeql-action/autobuild@v1 |
48 |
| - - name: perform CodeQL analysis |
49 |
| - uses: github/codeql-action/analyze@v1 |
| 37 | + - name: Initialize CodeQL |
| 38 | + uses: github/codeql-action/init@v2 |
| 39 | + # Override language selection by uncommenting this and choosing your languages |
| 40 | + # with: |
| 41 | + # languages: go, javascript, csharp, python, cpp, java, ruby |
| 42 | + |
| 43 | + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). |
| 44 | + # If this step fails, then you should remove it and run the build manually (see below). |
| 45 | + - name: Autobuild |
| 46 | + uses: github/codeql-action/autobuild@v2 |
| 47 | + |
| 48 | + # ℹ️ Command-line programs to run using the OS shell. |
| 49 | + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
| 50 | + |
| 51 | + # ✏️ If the Autobuild fails above, remove it and uncomment the following |
| 52 | + # three lines and modify them (or add more) to build your code if your |
| 53 | + # project uses a compiled language |
| 54 | + |
| 55 | + #- run: | |
| 56 | + # make bootstrap |
| 57 | + # make release |
| 58 | + |
| 59 | + - name: Perform CodeQL Analysis |
| 60 | + uses: github/codeql-action/analyze@v2 |
0 commit comments