~sircmpwn/sr.ht-discuss

3 3

Run build only on push to certain branch

Details
Message ID
<1a38407ced25cab2c7755cd245c3f5250ab8eddd.camel@mun-tonsi.net>
DKIM signature
pass
Download raw message
Is there a way of specifying in the YAML build specification that
builds should only run on pushes to certain branches?

Thanks,
Genevieve
Details
Message ID
<eb3ab6f056fc76bbda01c90e1d53fb1f@purelymail.com>
In-Reply-To
<1a38407ced25cab2c7755cd245c3f5250ab8eddd.camel@mun-tonsi.net> (view parent)
DKIM signature
pass
Download raw message
On 2024-09-26 10:48, Genevieve Clifford wrote:
> Is there a way of specifying in the YAML build specification that
> builds should only run on pushes to certain branches?

I think the assumption is that you can exit early from a task, or 
execute complete-build to stop all tasks, if your branch doesn't match 
the one that you want.

Cheers,
/Marius
Details
Message ID
<D4GAQLC23FMW.55KSEP0I87EU@cepl.eu>
In-Reply-To
<1a38407ced25cab2c7755cd245c3f5250ab8eddd.camel@mun-tonsi.net> (view parent)
DKIM signature
pass
Download raw message
On Thu Sep 26, 2024 at 12:48 PM CEST, Genevieve Clifford wrote:
> Is there a way of specifying in the YAML build specification that
> builds should only run on pushes to certain branches?

There is nothing, but you are including in that YAML just a
regular shell scripts, so you can do something like
https://git.sr.ht/~mcepl/m2crypto/tree/master/item/.build.yml#L37
where I build README.html only for the `master` branch.

Best,

Matěj

-- 
http://matej.ceplovi.cz/blog/, @mcepl@floss.social
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
All men's miseries derive from not being able to sit in a quiet
room alone.
  -- Blaise Pascal
Details
Message ID
<263ba0279f700919deb06872dcb5f068f1a15994.camel@mun-tonsi.net>
In-Reply-To
<D4GAQLC23FMW.55KSEP0I87EU@cepl.eu> (view parent)
DKIM signature
pass
Download raw message
On Thu, 2024-09-26 at 16:47 +0200, Matěj Cepl wrote:
> so you can do something like
> https://git.sr.ht/~mcepl/m2crypto/tree/master/item/.build.yml#L37
> where I build README.html only for the `master` branch.

On Thu, 2024-09-26 at 14:00 +0000, Marius wrote:
> I think the assumption is that you can exit early from a task, or 
> execute complete-build to stop all tasks, if your branch doesn't
> match the one that you want.

Thank you both for these! Much appreciated 🙂

Best,
Gen
-- 
Genevieve Clifford
My pronouns are: she/her | Fy rhagenw yw: hi
Website | Gwefan: https://mun-tonsi.net
Email | E-bost: genevieve@mun-tonsi.net
Reply to thread Export thread (mbox)