Re: [PATCH 0/2] replacing ci/config/allow-ref with a repo variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/09/2023 18:32, Jeff King wrote:
On Fri, Sep 01, 2023 at 02:24:59PM +0100, Phillip Wood wrote:

On 30/08/2023 20:49, Jeff King wrote:
This is a more efficient way to do the same thing that
ci/config/allow-ref does (which didn't exist back then).

I like the idea of a more efficient way to skip the ci for certain refs.
I've got my allow-ref script set up to reject a bunch of refs and run the ci
on everything else. It's not clear to me how to replicate that with the
setup proposed here. Would it be possible to add a second variable that
prevents the ci from being run if it contains ref being pushed?

Drat, I was hoping nobody was using it that way. :)

Sorry to be a pain.

Yes, I think it would be possible to do something like:

   if: |
     (vars.CI_BRANCHES == '' || contains(vars.CI_BRANCHES, github.ref_name)) &&
     !contains(vars.CI_BRANCHES_REJECT, github.ref_name)

It doesn't allow globbing, though. Do you need that?

Oh I'd missed that, yes I do. All the globs are prefix matches but I'm not sure that helps.

Best Wishes

Phillip

-Peff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux