Merge pull request #710 from rgoldberg/709-imports #52
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 repository | |
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}} |