Merge pull request #718 from rgoldberg/717-scripts #41
This file contains 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
# | |
# .github/workflows/codeql.yml | |
# | |
--- | |
name: CodeQL | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: 44 14 * * 4 | |
workflow_dispatch: | |
jobs: | |
analyze: | |
name: Analyze ${{matrix.language}} | |
runs-on: macos-15 | |
permissions: | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- language: actions | |
build-mode: none | |
- language: swift | |
build-mode: manual | |
steps: | |
- name: π Checkout repo | |
env: | |
GIT_CONFIG_COUNT: 1 | |
GIT_CONFIG_KEY_0: init.defaultBranch | |
GIT_CONFIG_VALUE_0: ${{github.event.repository.default_branch}} | |
uses: actions/checkout@v4 | |
with: | |
# Include all history & tags for script/version | |
fetch-depth: 0 | |
- name: π§ Setup repo | |
run: script/setup_workflow_repo | |
- name: π© Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{matrix.language}} | |
build-mode: ${{matrix.build-mode}} | |
queries: ${{matrix.language == 'swift' && '+security-and-quality' || ''}} | |
- name: π Build Swift | |
if: matrix.language == 'swift' | |
shell: bash | |
run: | | |
script/build codeql | |
- name: π Perform CodeQL analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: /language:${{matrix.language}} |