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

Re: [PATCH] ci: avoid unnecessary builds

From
Taylor Blau <me@ttaylorr.com>
Date
Nov 8, 2022, 18:30 UTC
Message-ID
<Y2qgPKRW1+9BNkIp@nand.local>
In-Reply-To
<75ono097-16nr-nno4-rqoq-rrn79spps249@tzk.qr>
On Tue, Nov 08, 2022 at 09:18:21AM +0100, Johannes Schindelin wrote:
Show 9 quoted lines
> > I played around with the following, but I can't quite get Actions to
> > like it. The error message I get (ref[1]) is something like:
> >
> >     The workflow is not valid. .github/workflows/main.yml (Line: 96, Col:
> >     27): Unexpected value 'needs.ci-config.outputs.skip_concurrent == 'yes''
> >     .github/workflows/main.yml (Line: 123, Col: 27): Unexpected value
> >     'needs.ci-config.outputs.skip_concurrent == 'yes''
>
> The reason is that what you are trying to do simply cannot work.

I was surprised that I couldn't get this to work, because to me it seemed like the sort of thing that *should* be possible to do.

Indeed, it is, and I made a couple of mistakes in writing the workflow file:

  - The expression for 'skip-in-progress' needed to be enclosed in
    '${{}}' markers.
  - It also needed to take into account the job name (and matrix
    information!) where relevant. And here we can't just use
    ${{github.job}}, since that is only available inside of the job
    steps.

To the last bullet point there, we unfortunately have to copy and paste the job name, which seems like a limitation of the Actions workflow parser to me.

I posted an alternative approach to this patch in [1], and I would be very curious to hear your thoughts, if you have time!

Thanks, Taylor

[1]: https://lore.kernel.org/git/cover.1667931937.git.me@ttaylorr.com/T/#t
Previous: Johannes SchindelinNext: Ævar Arnfjörð Bjarmason
Message 16 of 20 in “ci: avoid unnecessary builds”
  1. ci: avoid unnecessary buildsJohannes Schindelin via GitGitGadget, Nov 3, 2022
  2. Ævar Arnfjörð BjarmasonNov 4, 2022
  3. Taylor BlauNov 4, 2022
  4. Jeff KingNov 4, 2022
  5. Johannes SchindelinNov 8, 2022
  6. Jeff KingNov 9, 2022
  7. Taylor BlauNov 10, 2022
  8. Taylor BlauNov 4, 2022
  9. Derrick StoleeNov 7, 2022
  10. Taylor BlauNov 7, 2022
  11. Derrick StoleeNov 7, 2022
  12. Ævar Arnfjörð BjarmasonNov 7, 2022
  13. Derrick StoleeNov 7, 2022
  14. Taylor BlauNov 7, 2022
  15. Johannes SchindelinNov 8, 2022
  16. Taylor BlauNov 8, 2022
  17. Ævar Arnfjörð BjarmasonNov 7, 2022
  18. Derrick StoleeNov 8, 2022
  19. Junio C HamanoNov 8, 2022
  20. Johannes SchindelinNov 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.