add the script, and the else #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "CodeQL" | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| schedule: | |
| - cron: "0 3 * * 0" # weekly scan on Sunday 03:00 UTC | |
| jobs: | |
| analyze: | |
| name: Analyze (CodeQL) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: ["python"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v2 | |
| with: | |
| languages: ${{ matrix.language }} | |
| # If you have custom queries, add them here: | |
| # queries: ./codeql-queries | |
| # Or disable default queries: queries: [] | |
| config-file: .github/codeql/codeql-config.yml # optional | |
| - name: Autobuild | |
| uses: github/codeql-action/autobuild@v2 | |
| - name: Run CodeQL analysis | |
| uses: github/codeql-action/analyze@v2 | |
| with: | |
| # If you specified queries in init, they will be used. | |
| output: sarif/codeql-results.sarif |