From: Taylor Blau <me@ttaylorr.com>
To: Jeff King <peff@peff.net>
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Taylor Blau" <me@ttaylorr.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH] ci: avoid unnecessary builds
Date: Wed, 9 Nov 2022 21:40:30 -0500 [thread overview]
Message-ID: <Y2xknh1TqMTdpIxE@nand.local> (raw)
In-Reply-To: <Y2uygXD7R+fsC0as@coredump.intra.peff.net>
On Wed, Nov 09, 2022 at 09:00:33AM -0500, Jeff King wrote:
> On Tue, Nov 08, 2022 at 10:16:15AM +0100, Johannes Schindelin wrote:
>
> > > As an aside, I wish there was a way to interpret per-repo environment
> > > variables in the actual action config.
> >
> > There kind of is. "Kind of" because it is not _really_ a per-repo variable
> > (those do not exist on GitHub), but there are topics you can set. These
> > are relatively free-form labels you can attach to _your_ fork, and these
> > labels show up below the "About" section and the link to the home page (if
> > any) on the right side of your respository. AFAICT these topics are not
> > inherited automatically when forking a repository, which is precisely what
> > we want. See
> > https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/classifying-your-repository-with-topics
> > for more details on that.
>
> Ah, that's very clever, thank you!
Very cute.
> For the original problem that motivated me adding ci-config in the first
> place, branch selection, I think we could do this:
>
> if: |
> !contains(join(github.event.repository.topics), 'ci-only-') ||
> contains(github.event.repository.topics, format('ci-only-{0}', github.ref_name))
>
> and then by default we'd continue to build for all pushes, but if you
> add ci-only-foo as a repo topic, then we'd build only refs/heads/foo.
>
> I may see if I can work this into our workflow file. Even if we can't
> get rid of ci-config for the skip-successful-build feature, this would
> still save CPU by dropping even ci-config when the branch should be
> skipped entirely.
Yeah. I'd be hesitant to see a bunch of CI configuration knobs get
folded into the repository topics feature, but a clear "save CI minutes
if we don't care about building these branch(es)" is useful.
Thanks,
Taylor
next prev parent reply other threads:[~2022-11-10 2:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 13:34 [PATCH] ci: avoid unnecessary builds Johannes Schindelin via GitGitGadget
2022-11-04 1:46 ` Ævar Arnfjörð Bjarmason
2022-11-04 2:23 ` Taylor Blau
2022-11-04 3:20 ` Jeff King
2022-11-08 9:16 ` Johannes Schindelin
2022-11-09 14:00 ` Jeff King
2022-11-10 2:40 ` Taylor Blau [this message]
2022-11-04 2:09 ` Taylor Blau
2022-11-07 19:45 ` Derrick Stolee
2022-11-07 19:53 ` Taylor Blau
2022-11-07 20:08 ` Derrick Stolee
2022-11-07 21:03 ` Ævar Arnfjörð Bjarmason
2022-11-07 21:59 ` Derrick Stolee
2022-11-07 22:44 ` Taylor Blau
2022-11-08 8:18 ` Johannes Schindelin
2022-11-08 18:30 ` Taylor Blau
2022-11-07 22:56 ` Ævar Arnfjörð Bjarmason
2022-11-08 0:02 ` Derrick Stolee
2022-11-08 0:31 ` Junio C Hamano
2022-11-08 9:51 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y2xknh1TqMTdpIxE@nand.local \
--to=me@ttaylorr.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).