From 1752daa378e859ab497873e7ca27cc99fd430042 Mon Sep 17 00:00:00 2001
From: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Date: Thu, 16 Feb 2023 23:42:36 +0100
Subject: [PATCH] [CI] Optimize CodeQL so it doesn't run two times per commit
 (#28392)

[ci skip]
---
 .github/workflows/codeql.yml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 68e9f19c89d..f5fa28f27b7 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -1,6 +1,11 @@
 name: "CodeQL"
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - 'master'
+      - 'release-**'
+  pull_request:
 
 jobs:
   analyze:
-- 
GitLab