| name: codeql | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| # Cancel stale PR runs without interrupting push, tag, scheduled, or | |
| # manually dispatched validation. | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| - '[0-9]+.[0-9]+' | |
| - '[0-9]+.x' | |
| tags: | |
| - 'v*' | |
| - 'docker-v*' | |
| - 'api/v*' | |
| - 'client/v*' | |
| pull_request: | |
| schedule: | |
| # ┌───────────── minute (0 - 59) | |
| # │ ┌───────────── hour (0 - 23) | |
| # │ │ ┌───────────── day of the month (1 - 31) | |
| # │ │ │ ┌───────────── month (1 - 12) | |
| # │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday) | |
| # │ │ │ │ │ | |
| # │ │ │ │ │ | |
| # │ │ │ │ │ | |
| # * * * * * | |
| - cron: '0 9 * * 4' | |
| env: | |
| GO_VERSION: "1.26.10" | |
| jobs: | |
| codeql: | |
| if: github.repository == 'moby/moby' | |
| runs-on: ubuntu-26.04 | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| security-events: write | |
| steps: | |
| - | |
| name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 2 | |
| - | |
| name: Set up Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache: false | |
| - | |
| name: Initialize CodeQL | |
| uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2 | |
| with: | |
| languages: go | |
| - | |
| name: Autobuild | |
| uses: github/codeql-action/autobuild@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2 | |
| - | |
| name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2 | |
| with: | |
| category: "/language:go" |