ha-handler/run-ci.sh

18 lines
384 B
Bash
Raw Permalink Normal View History

#!/bin/sh
set -e
BUILDS_INSTANCE=https://builds.sr.ht
MANIFEST=.build.yml
if [ -z "$SRHT_ACCESS_TOKEN" ]; then
echo "Please set SRHT_ACCESS_TOKEN before calling this script." >&2
exit 1
fi
curl \
-H Authorization:"token $SRHT_ACCESS_TOKEN" \
--data "manifest=$(jq -R -r --slurp < $MANIFEST)" \
--data "note=recycledcloud-ha-handler" \
-X POST $BUILDS_INSTANCE/api/jobs | jq