docs: improve best practices #1
Workflow file for this run
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
name: "CodeQL" | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
schedule: | |
- cron: '00 13 * * 1' | |
permissions: | |
contents: read | |
jobs: | |
analyze: | |
name: Analyze (${{ matrix.language }}) | |
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | |
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} | |
permissions: | |
# required for all workflows | |
security-events: write | |
# required to fetch internal or private CodeQL packs | |
packages: read | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- language: go | |
build-mode: manual | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
with: | |
persist-credentials: false | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@df5a14dc28094dc936e103b37d749c6628682b60 # v3.25.0 | |
with: | |
languages: ${{ matrix.language }} | |
build-mode: ${{ matrix.build-mode }} | |
- if: matrix.build-mode == 'manual' | |
env: | |
# fix "go: download go1.22 for linux/amd64: toolchain not available" error | |
GOTOOLCHAIN: "go1.22.2" | |
run: | | |
make go-build | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@df5a14dc28094dc936e103b37d749c6628682b60 # v3.25.0 | |
with: | |
category: "/language:${{matrix.language}}" |