coverity: allow overriding the Coverity project

By default, the builds are submitted to the `git` project at https://scan.coverity.com/projects/git. The Git for Windows project would like to use this workflow, too, though, and needs the builds to be submitted to the `git-for-windows` Coverity project. To that end, allow configuring the Coverity project name via the repository variable, you guessed it, `COVERITY_PROJECT`. The default if that variable is not configured or has an empty value is still `git`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Sep 25, 2023 at 11:50 UTC 7bc49e8f553c0f76cccd142c33715ee8f1b15811
1 file changed +4 -1
.github/workflows/coverity.yml
+4 -1
@@ -11,6 +11,9 @@ name: Coverity
11 # `COVERITY_SCAN_EMAIL` and `COVERITY_SCAN_TOKEN`. The former specifies the
12 # email to which the Coverity reports should be sent and the latter can be
13 # obtained from the Project Settings tab of the Coverity project).
14 +#
15 +# By default, the builds are submitted to the Coverity project `git`. To override this,
16 +# set the repository variable `COVERITY_PROJECT`.
17
18 on:
19 push:
@@ -20,7 +23,7 @@ jobs:
23 if: contains(fromJSON(vars.ENABLE_COVERITY_SCAN_FOR_BRANCHES || '[""]'), github.ref_name)
24 runs-on: ubuntu-latest
25 env:
23 - COVERITY_PROJECT: git
26 + COVERITY_PROJECT: ${{ vars.COVERITY_PROJECT || 'git' }}
27 COVERITY_LANGUAGE: cxx
28 COVERITY_PLATFORM: linux64
29 steps: