4
0
Fork 0
mirror of https://github.com/Azure/setup-helm.git synced 2025-11-07 13:06:56 +00:00
setup-helm/.github/workflows/TriggerIntegrationTests.sh
2021-03-26 21:35:41 +05:30

32 lines
No EOL
724 B
Bash

token=$1
commit=$2
repository=$3
prNumber=$4
frombranch=$5
tobranch=$6
getPayLoad() {
cat <<EOF
{
"event_type": "SetupHelmActionPR",
"client_payload":
{
"action": "SetupHelm",
"commit": "$commit",
"repository": "$repository",
"prNumber": "$prNumber",
"tobranch": "$tobranch",
"frombranch": "$frombranch"
}
}
EOF
}
response=$(curl -X POST -H "Authorization: token $token" https://api.github.com/repos/sundargs2000/azure-actions-integration-tests/dispatches --data "$(getPayLoad)")
if [ "$response" == "" ]; then
echo "Integration tests triggered successfully"
else
echo "Triggering integration tests failed with: '$response'"
exit 1
fi