Skip to content

Commit

Permalink
chore: update trigger script [ci-skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jan 21, 2021
1 parent 4a379ec commit d6ce29f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/trigger-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ fi

repository_slug=$(git remote get-url $(git remote show) | cut -d':' -f2 | sed 's/\.git//')

output=$(curl -v -X POST https://api.github.com/repos/${repository_slug}/dispatches \
output=$(curl -X https://api.github.com/repos/${repository_slug}/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-H "Authorization: Bearer $GITHUB_ACCESS_TOKEN_FOR_PF_RELEASES" \
-d "{\"event_type\": \"release-triggered\", \"client_payload\": {\"increment\": ${increment}}}" 2>&1)

if ! echo "${output}" | grep "HTTP\/1.1 204" > /dev/null; then
if ! echo "${output}" | grep "HTTP\/.* 204" > /dev/null; then
echo "$output" | sed "s/${GITHUB_ACCESS_TOKEN_FOR_PF_RELEASES}/********/g"
echo "Failed to trigger release"
exit 1
Expand Down

0 comments on commit d6ce29f

Please sign in to comment.