17 lines
384 B
Bash
Executable file
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-management" \
|
|
-X POST $BUILDS_INSTANCE/api/jobs | jq
|