Skip to content

Commit 11611b6

Browse files
committed
ci: encode and shorten preview domain name
1 parent 10b01da commit 11611b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/previews-ods-ui.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
id: vars
4747
run: |
4848
BRANCH_NAME="${GITHUB_HEAD_REF}"
49-
BRANCH_STANDARDIZED="$(echo ${BRANCH_NAME}| tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9-]+/-/g; s/-+/-/g; s/^-+//; s/-+$//')"
49+
BRANCH_STANDARDIZED="$(perl -MURI::Escape -e 'print uri_escape($ARGV[0])' "$BRANCH_NAME" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9-]+/-/g; s/-+/-/g; s/^-+//; s/-+$//' | cut -c1-40)"
5050
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
5151
echo "branch=${BRANCH_STANDARDIZED}" >> $GITHUB_OUTPUT
5252

0 commit comments

Comments
 (0)