ha-handler/run-ci.sh
2022-01-27 09:35:53 +01:00

17 lines
384 B
Bash
Executable file

#!/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