lfarci / github-actions

Preparation resources for the GitHub Actions certification
0 stars 0 forks source link

Use CodeQL as a step in a workflow #23

Closed lfarci closed 5 months ago

lfarci commented 5 months ago

Exam Pro

Here's a short example:

name: "CodeQL"

on:
  push:
  pull_request:
  schedule:
    - cron: '0 23 * * 3'

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Initialize CodeQL
        uses: github/codeql-action/init@v1
        with:
          languages: "auto"

      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@v1