Skip to content

Commit

Permalink
Support for bearer token auth, in addition to basic auth
Browse files Browse the repository at this point in the history
  • Loading branch information
distributhor committed Nov 4, 2023
1 parent 50bd7b9 commit f5a294e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ outputs:

runs:
using: 'docker'
image: 'Dockerfile'
# image: 'docker://ghcr.io/distributhor/workflow-webhook-container:v3.0.6'
# image: 'Dockerfile'
image: 'docker://ghcr.io/distributhor/workflow-webhook-container:v3.0.7'

branding:
icon: 'terminal'
Expand Down
14 changes: 0 additions & 14 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,20 +210,6 @@ if [ -n "$curl_opts" ]; then
options="$options $curl_opts"
fi

# if [ -n "$webhook_auth" ] && [ "$auth_type" == "bearer" ]; then
# options="$options -H 'Authorization: Bearer $webhook_auth'"
# fi

# if [ -n "$webhook_auth" ] && [ "$auth_type" == "header" ]; then
# header_name=`[[ $webhook_auth =~ ([^:]*) ]] && echo "${BASH_REMATCH[1]}"`
# header_value=`[[ $webhook_auth =~ :(.*) ]] && echo "${BASH_REMATCH[1]}"`
# if [ -z "$header_value" ]; then
# options="$options -H 'Authorization: $webhook_auth'"
# else
# options="$options -H '$header_name: $header_value'"
# fi
# fi

if [ "$verbose" = true ]; then
echo "curl $options \\"
echo "-H 'Content-Type: $CONTENT_TYPE' \\"
Expand Down

0 comments on commit f5a294e

Please sign in to comment.