mirror of
https://github.com/docker/docker-agent.git
synced 2026-11-06 15:07:58 +00:00
Every job gets timeout-minutes, every checkout persist-credentials: false, and local actions use the $/ syntax. docs-deploy scopes pages/id-token permissions to the deploy job. CodeQL's Go analysis restores the test-linux build cache through setup-go instead of setup-go's shared snapshot.
62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
name: codeql
|
|
|
|
permissions:
|
|
contents: read
|
|
security-events: write
|
|
actions: read
|
|
|
|
# Main and tag runs get a group of their own so they are never queued behind
|
|
# or cancelled by another run; PR runs supersede the previous run on the ref.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && github.run_id || github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/') }}
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
schedule:
|
|
- cron: '23 14 * * 1'
|
|
|
|
jobs:
|
|
analyze:
|
|
timeout-minutes: 30
|
|
name: analyze (${{ matrix.language }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- language: go
|
|
build-mode: autobuild
|
|
- language: actions
|
|
build-mode: none
|
|
- language: javascript-typescript
|
|
build-mode: none
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- if: matrix.language == 'go'
|
|
uses: $/.github/actions/setup-go
|
|
with:
|
|
cache-name: test-linux
|
|
save: 'false'
|
|
task: 'false'
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0
|
|
with:
|
|
languages: ${{ matrix.language }}
|
|
build-mode: ${{ matrix.build-mode }}
|
|
|
|
- name: Autobuild
|
|
if: matrix.build-mode == 'autobuild'
|
|
uses: github/codeql-action/autobuild@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0
|
|
|
|
- name: Analyze
|
|
uses: github/codeql-action/analyze@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0
|
|
with:
|
|
category: "/language:${{ matrix.language }}"
|