github.1git.de/docker/cli@v26.1.3+incompatible/.github/workflows/codeql.yml (about) 1 name: codeql 2 3 on: 4 push: 5 branches: 6 - 'master' 7 - '[0-9]+.[0-9]+' 8 tags: 9 - 'v*' 10 pull_request: 11 # The branches below must be a subset of the branches above 12 branches: [ "master" ] 13 schedule: 14 # ┌───────────── minute (0 - 59) 15 # │ ┌───────────── hour (0 - 23) 16 # │ │ ┌───────────── day of the month (1 - 31) 17 # │ │ │ ┌───────────── month (1 - 12) 18 # │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday) 19 # │ │ │ │ │ 20 # │ │ │ │ │ 21 # │ │ │ │ │ 22 # * * * * * 23 - cron: '0 9 * * 4' 24 25 jobs: 26 codeql: 27 runs-on: 'ubuntu-latest' 28 timeout-minutes: 360 29 env: 30 DISABLE_WARN_OUTSIDE_CONTAINER: '1' 31 permissions: 32 actions: read 33 contents: read 34 security-events: write 35 36 steps: 37 - 38 name: Checkout 39 uses: actions/checkout@v4 40 with: 41 fetch-depth: 2 42 - 43 name: Checkout HEAD on PR 44 if: ${{ github.event_name == 'pull_request' }} 45 run: | 46 git checkout HEAD^2 47 - 48 name: Update Go 49 uses: actions/setup-go@v5 50 with: 51 go-version: '1.21' 52 - 53 name: Initialize CodeQL 54 uses: github/codeql-action/init@v3 55 with: 56 languages: go 57 # CodeQL 2.16.4's auto-build added support for multi-module repositories, 58 # and is trying to be smart by searching for modules in every directory, 59 # including vendor directories. If no module is found, it's creating one 60 # which is ... not what we want, so let's give it a "go.mod". 61 # see: https://github.com/docker/cli/pull/4944#issuecomment-2002034698 62 - 63 name: Create go.mod 64 run: | 65 ln -s vendor.mod go.mod 66 ln -s vendor.sum go.sum 67 - 68 name: Autobuild 69 uses: github/codeql-action/autobuild@v3 70 - 71 name: Perform CodeQL Analysis 72 uses: github/codeql-action/analyze@v3 73 with: 74 category: "/language:go"