On Tue, May 05, 2020 at 02:29:09PM -0700, Junio C Hamano wrote: > > This commit adds a new job which checks a special ref within the > > repository for CI config, and (optionally) causes all of the other jobs > > to be skipped. > > Nice---that way, all existing jobs do not even need to know about > the special controlling ref. Yep. Also, it only has to run once. It's not too expensive, but it does seem to take a few seconds to run. I think the VM setup is usually pretty quick due to the way Actions is implemented. I made sure we avoid cloning the whole normal git.git tree, but we still have to clone the individual config branch. It seems to take ~3-5s to run that job. I'd have liked to make it even cheaper for branches which don't want CI (less for latency, but more just because I hate to waste GitHub's resources), but I think that's the best we can do. And for cases where we actually run CI, 3s is a drop in the bucket. ;) > > Right now the logic is to run CI for all branches by default, unless a > > whitelist exists, in which case the branch must be mentioned there > > (using its fully qualified ref name). > > So there is no wildcard? Not really complaining, but am wondering. Correct, there's no wildcard. It would be easy to add one, now that this gets us to a working shell environment with the refname available. And probably worth doing if we don't just go the "execute a program from the config tree" route. > > Or since we're running a shell in a VM, we really > > could just run "./allow-ref $refname" and let individual forks specify > > whatever shell code they like. > > I presume that you are saying "checking out the tree of refs/ci/config > and there is a program allow-ref that can tell which one to run ci on"? Yes, exactly. -Peff