mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
We’ve always been running CI on both push events and pull_request events, which means it runs twice for commits that are pushed to a pull request. Filter the push events by branch name. Add the workflow_dispatch event in case developers want to manually run CI on some other branch that isn’t a pull request. https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow Signed-off-by: Anders Kaseorg <anders@zulip.com>
33 lines
799 B
YAML
33 lines
799 B
YAML
name: "Code scanning"
|
|
|
|
on:
|
|
push:
|
|
branches: ["*.x", chat.zulip.org, main]
|
|
tags: ["*"]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: "${{ github.workflow }}-${{ github.head_ref || github.run_id }}"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
CodeQL:
|
|
if: ${{!github.event.repository.private}}
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v3
|
|
|
|
# Initializes the CodeQL tools for scanning.
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@v2
|
|
|
|
# Override language selection by uncommenting this and choosing your languages
|
|
# with:
|
|
# languages: go, javascript, csharp, python, cpp, java
|
|
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@v2
|