18 lines
384 B
Bash
18 lines
384 B
Bash
|
#!/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
|