Skip to content

Commit

Permalink
Testing script support different hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
AuHau committed Feb 28, 2019
1 parent c7351f1 commit 8bc6eb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion github_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

repo_name=$1
secret=$2
url=${3-http://localhost:8000}

data="{\"ref\": \"\"}"

sig=$(echo -n "${data}" | openssl dgst -sha1 -hmac "${secret}" | awk '{print "X-Hub-Signature: sha1="$1}')

curl -X POST -H "X-GitHub-Event: push" -H "Content-Type: application/json" -H "${sig}" --data "${data}" http://localhost:8000/publish/${repo_name}
curl -X POST -H "X-GitHub-Event: push" -H "Content-Type: application/json" -H "${sig}" --data "${data}" ${url}/publish/${repo_name}

0 comments on commit 8bc6eb1

Please sign in to comment.