API

It is unlikely that you need this API.

You only need this API if you want to use a forge other than the directly supported forges.

When in doubt, feel free to get in touch.

Build a commit

Needs an auth token in your netrc.

suite=$(curl --netrc --silent --show-error --fail-with-body \
  --header 'Accept: text/plain' \
  --data-urlencode "clone-url=https://your.git.server/owner/repository.git" \
  --data-urlencode "default-branch=$DEFAULT_BRANCH" \
  --data-urlencode "ref=$REF" \
  --data-urlencode "commit=$COMMIT" \
  --data-urlencode "message=$COMMIT_MESSAGE" \
  https://api.nix-ci.com/suite)

curl --netrc --fail --retry 1000 --retry-delay 10 https://api.nix-ci.com/suite/$suite/wait

Set the four variables to the commit you want built. curl escapes them.

The second command answers when the build finishes, and fails if it did not pass, so it can be the last line of a script.

For a private repository, use its ssh clone url, git@your.git.server:owner/repository.git , and put the key in a GIT_SSH_KEY secret.