Skip to content

Commit

Permalink
Pass github access_token via Authorization header
Browse files Browse the repository at this point in the history
Change-type: patch
Signed-off-by: Trong Nghia Nguyen <[email protected]>
  • Loading branch information
nghiant2710 committed Jun 1, 2022
1 parent 1139624 commit 36e7a17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ cat > request.json <<-EOF
"prerelease": false
}
EOF
curl --data "@request.json" --header "Content-Type:application/json" \
"https://api.github.com/repos/$ACCOUNT/$REPO/releases?access_token=$ACCESS_TOKEN" \
curl --data "@request.json" -H "Authorization:token $ACCESS_TOKEN" -H "Content-Type:application/json" \
"https://api.github.com/repos/$ACCOUNT/$REPO/releases" \
-o response.json
# Parse response
RELEASE_ID=$(cat response.json | jq '.id')
Expand Down

0 comments on commit 36e7a17

Please sign in to comment.