Add token whitespace trimming and debug line
This commit is contained in:
@@ -19,6 +19,12 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
BASE_URL="${{ inputs.BASE_URL }}"
|
BASE_URL="${{ inputs.BASE_URL }}"
|
||||||
|
DEPLOY_TOKEN="${{ inputs.DEPLOY_TOKEN }}"
|
||||||
|
|
||||||
|
# Strip any whitespace/newlines
|
||||||
|
DEPLOY_TOKEN="${DEPLOY_TOKEN//[$'\t\r\n ']}"
|
||||||
|
|
||||||
|
echo "Token length: ${#DEPLOY_TOKEN}"
|
||||||
|
|
||||||
# Strip trailing slashes
|
# Strip trailing slashes
|
||||||
BASE_URL="${BASE_URL%/}"
|
BASE_URL="${BASE_URL%/}"
|
||||||
@@ -28,6 +34,8 @@ runs:
|
|||||||
BASE_URL="https://${BASE_URL}"
|
BASE_URL="https://${BASE_URL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Using url ${BASE_URL}/api/v1/deploy?site=${{ inputs.SITE_ID }}"
|
||||||
|
|
||||||
RESPONSE=$(curl -sS -X POST \
|
RESPONSE=$(curl -sS -X POST \
|
||||||
"${BASE_URL}/api/v1/deploy?site=${{ inputs.SITE_ID }}" \
|
"${BASE_URL}/api/v1/deploy?site=${{ inputs.SITE_ID }}" \
|
||||||
-H "Authorization: Bearer ${{ inputs.DEPLOY_TOKEN }}" \
|
-H "Authorization: Bearer ${{ inputs.DEPLOY_TOKEN }}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user