|
1 | | -name: "Code scanning - action" |
| 1 | +name: "Code Scanning - Action" |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + - release-* |
5 | 8 | pull_request: |
| 9 | + branches: |
| 10 | + - main |
| 11 | + - release-* |
6 | 12 | schedule: |
7 | | - - cron: '0 19 * * 0' |
| 13 | + # ┌───────────── minute (0 - 59) |
| 14 | + # │ ┌───────────── hour (0 - 23) |
| 15 | + # │ │ ┌───────────── day of the month (1 - 31) |
| 16 | + # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) |
| 17 | + # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) |
| 18 | + # │ │ │ │ │ |
| 19 | + # │ │ │ │ │ |
| 20 | + # │ │ │ │ │ |
| 21 | + # * * * * * |
| 22 | + - cron: '30 1 * * 0' |
8 | 23 |
|
9 | 24 | jobs: |
10 | 25 | CodeQL-Build: |
11 | | - |
12 | | - # CodeQL runs on ubuntu-latest and windows-latest |
| 26 | + # CodeQL runs on ubuntu-latest, windows-latest, and macos-latest |
13 | 27 | runs-on: ubuntu-latest |
14 | 28 | if: github.repository == 'microsoft/TypeScript' |
15 | 29 |
|
| 30 | + permissions: |
| 31 | + # required for all workflows |
| 32 | + security-events: write |
| 33 | + |
16 | 34 | steps: |
17 | | - - name: Checkout repository |
18 | | - uses: actions/checkout@v3 |
19 | | - with: |
20 | | - # We must fetch at least the immediate parents so that if this is |
21 | | - # a pull request then we can checkout the head. |
22 | | - fetch-depth: 2 |
23 | | - |
24 | | - # Initializes the CodeQL tools for scanning. |
25 | | - - name: Initialize CodeQL |
26 | | - uses: github/codeql-action/init@v2 |
27 | | - with: |
28 | | - config-file: ./.github/codeql/codeql-configuration.yml |
29 | | - # Override language selection by uncommenting this and choosing your languages |
30 | | - # with: |
31 | | - # languages: go, javascript, csharp, python, cpp, java |
32 | | - |
33 | | - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
34 | | - # If this step fails, then you should remove it and run the build manually (see below) |
35 | | - - name: Autobuild |
36 | | - uses: github/codeql-action/autobuild@v2 |
37 | | - |
38 | | - # ℹ️ Command-line programs to run using the OS shell. |
39 | | - # 📚 https://git.io/JvXDl |
40 | | - |
41 | | - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines |
42 | | - # and modify them (or add more) to build your code if your project |
43 | | - # uses a compiled language |
44 | | - |
45 | | - #- run: | |
46 | | - # make bootstrap |
47 | | - # make release |
48 | | - |
49 | | - - name: Perform CodeQL Analysis |
50 | | - uses: github/codeql-action/analyze@v2 |
| 35 | + - name: Checkout repository |
| 36 | + uses: actions/checkout@v3 |
| 37 | + |
| 38 | + # Initializes the CodeQL tools for scanning. |
| 39 | + - name: Initialize CodeQL |
| 40 | + uses: github/codeql-action/init@v2 |
| 41 | + with: |
| 42 | + config-file: ./.github/codeql/codeql-configuration.yml |
| 43 | + # Override language selection by uncommenting this and choosing your languages |
| 44 | + # with: |
| 45 | + # languages: go, javascript, csharp, python, cpp, java |
| 46 | + |
| 47 | + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
| 48 | + # If this step fails, then you should remove it and run the build manually (see below). |
| 49 | + - name: Autobuild |
| 50 | + uses: github/codeql-action/autobuild@v2 |
| 51 | + |
| 52 | + # ℹ️ Command-line programs to run using the OS shell. |
| 53 | + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
| 54 | + |
| 55 | + # ✏️ If the Autobuild fails above, remove it and uncomment the following |
| 56 | + # three lines and modify them (or add more) to build your code if your |
| 57 | + # project uses a compiled language |
| 58 | + |
| 59 | + #- run: | |
| 60 | + # make bootstrap |
| 61 | + # make release |
| 62 | + |
| 63 | + - name: Perform CodeQL Analysis |
| 64 | + uses: github/codeql-action/analyze@v2 |
0 commit comments