From 6a248d64c9fc9d36c06b33f699383092fa87a8ce Mon Sep 17 00:00:00 2001 From: Jim Bumgardner Date: Fri, 19 Apr 2024 14:01:07 -0700 Subject: [PATCH] Support use of uppercase in branch names for PR previews. --- .github/workflows/eleventy_build_pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/eleventy_build_pr.yml b/.github/workflows/eleventy_build_pr.yml index 3e4ce4dcd32..0987672323b 100644 --- a/.github/workflows/eleventy_build_pr.yml +++ b/.github/workflows/eleventy_build_pr.yml @@ -33,7 +33,7 @@ jobs: run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV - name: Escape branch name for URL shell: bash - run: echo "URLSAFE_BRANCH_NAME=$(echo ${BRANCH_NAME} | sed 's|[^A-Za-z0-9-]|-|g' | sed -E 's|-*([A-Za-z0-9]*.*[A-Za-z0-9]+)-*|\1|' | cut -c 1-63)" >> $GITHUB_ENV + run: echo "URLSAFE_BRANCH_NAME=$(echo ${BRANCH_NAME} | tr '[:upper:]' '[:lower:]' | sed 's|[^A-Za-z0-9-]|-|g' | sed -E 's|-*([A-Za-z0-9]*.*[A-Za-z0-9]+)-*|\1|' | cut -c 1-63)" >> $GITHUB_ENV - name: Report escaped branch name shell: bash run: echo ${URLSAFE_BRANCH_NAME}