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

Re: [PATCH 1/1] ci: avoid unnecessary builds

From
Taylor Blau <me@ttaylorr.com>
Date
Nov 8, 2022, 20:08 UTC
Message-ID
<Y2q3QZDxuywzCexn@nand.local>
In-Reply-To
<221108.86r0ydqmts.gmgdl@evledraar.gmail.com>
On Tue, Nov 08, 2022 at 07:52:07PM +0100, Ævar Arnfjörð Bjarmason wrote:
> I don't know if there's a workaround for that, I'd think it would be the
> logical equivalent of e.g.:
>
> 	group: sparse-${{ matrix.nr }}-${{ github.ref }}-${{ needs.ci-config.outputs.skip_concurrent ? github.run_id : "" }}

Hmm. Did you mean the opposite of the last part of that expression? IOW, shouldn't it be:

  ${{ needs.ci-config.outputs.skip_concurrent ? "" : github.run_id }}

That is: if we're cancelling builds when others are in progress, the group ID shouldn't contain information about the specific run ID. But if we *aren't* cancelling builds, then the group needs to have the run ID in it, that way we're effectively disabling the new behavior altogether.

> But the docs say "The expression can only use the github context."[3],
> and I don't know if such a thing would fit inside the syntax...

That's at the workflow level. When you specify a 'concurrency' block inside of an individual job, you can use any context object excepts the secrets one [2].

Thanks, Taylor

[2]: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idconcurrency
Previous: Ævar Arnfjörð BjarmasonNext: Taylor Blau
Message 4 of 5 in “ci: avoid unnecessary builds, with ci-config”
  1. 0/1 ci: avoid unnecessary builds, with ci-configTaylor Blau, Nov 8, 2022
  2. 1/1 ci: avoid unnecessary buildsTaylor Blau, Nov 8, 2022
  3. Ævar Arnfjörð BjarmasonNov 8, 2022
  4. Taylor BlauNov 8, 2022
  5. Taylor BlauNov 8, 2022

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.