git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] .github/workflows: add coverity action

From
Jeff King <peff@peff.net>
Date
Aug 30, 2023, 00:18 UTC
Message-ID
<20230830001844.GA227310@coredump.intra.peff.net>
In-Reply-To
<6534ba5d-f4a6-71e6-5b0f-9cba2be8426e@gmx.de>
On Tue, Aug 29, 2023 at 10:18:24AM +0200, Johannes Schindelin wrote:
> - Limit it by repository "topics" (think: "repository tags"):
> 
> 	if: contains(github.event.repository.topics, 'has-coverity-secrets')

FWIW, I like this approach the most. As you note, it's not exactly obvious to discover, but I think it is the most flexible. And setting up Coverity runs already requires a lot of non-obvious steps (like creating an account with them and getting a token to paste into the GitHub secrets area).

My gut feeling is that we should be able to do something with env variables to avoid the (ab)use of repository tags, but when I looked into this in the past, it wasn't possible. However, poking at it again now, it seems that the "vars" context (but not "secrets") is available to "jobs.*.if". I'm not sure if I missed before, or if that's a new feature since the last time I checked.

At any rate, it seems to work to do:
  if: vars.ENABLE_COVERITY != ''

or even make COVERITY_SCAN_EMAIL a "var" instead of a "secret", and use that. Likewise, I think we could do:

  if: contains(vars.COVERITY_BRANCHES, github.ref_name)

to allow individual repositories to do their own branch selection (that is matching by substring, which is probably good enough, but if you want to get fancy, I think we can use fromJSON to interpret the contents of the variable).

(I had mostly looked into this in the context of branch selection for our ci-config job, and I think we could do something similar there).

-Peff
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 5 of 13 in “.github/workflows: add coverity action”
  1. .github/workflows: add coverity actionTaylor Blau, Aug 22, 2023
  2. Jeff KingAug 25, 2023
  3. Jeff KingAug 25, 2023
  4. Johannes SchindelinAug 29, 2023
  5. Jeff KingAug 30, 2023
  6. Johannes SchindelinAug 30, 2023
  7. Jeff KingAug 30, 2023
  8. .github/workflows: add coverity actionTaylor Blau, Sep 21, 2023
  9. Junio C HamanoSep 21, 2023
  10. Johannes SchindelinSep 22, 2023
  11. Jeff KingSep 23, 2023
  12. Jeff KingSep 23, 2023
  13. Jeff KingSep 23, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.