~timharek/sourcehut-builds-pkl

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~timharek/sourcehut-builds-pkl
read/write
git@git.sr.ht:~timharek/sourcehut-builds-pkl

You can also use your local clone with git send-email.

#SourceHut Builds Pkl template

A simple [pkl]-template following [SourceHut's build mainfest].

#How to use

Clone this repo, or copy SourceHutBuilds.pkl.

Create a new file, eg. build.pkl:

amends "/path/to/your/SourceHutBuilds.pkl"

image = "alpine/edge"
tasks = new Listing<Mapping> {
  new {
    ["say-hello"] = "echo hello"
  }
  new {
    ["say-world"] = "echo world"
  }
}

Now you can generate a valid, type-checked .build.yml with:

pkl eval -f yaml /path/to/your/pkl.pkl -o .build.yml