blob: 7a3dd5088eb5f3d377fa77c65b3e6e4c0327f4a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh
token="${1}"
version="${2}"
resp="$(curl -X POST \
-H 'Accept: application/vnd.github.v3+json' \
-H "Authorization: Bearer ${token}" \
"https://api.github.com/repos/netdata/netdata/actions/workflows/docker.yml/dispatches" \
-d "{\"ref\": \"master\", \"inputs\": {\"version\": \"${version}\"}}")"
if [ -z "${resp}" ]; then
echo "Successfully triggered Docker image build."
exit 0
else
echo "Failed to trigger Docker image build. Output:"
echo "${resp}"
exit 1
fi
|