From 3617c3dc9a1eac0b3d7528fd39019d3a45ebc146 Mon Sep 17 00:00:00 2001 From: Joab <89288499+Joabutt@users.noreply.github.com> Date: Wed, 27 Dec 2023 14:23:10 +0800 Subject: [PATCH] Update check_pr.yml --- .github/workflows/check_pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check_pr.yml b/.github/workflows/check_pr.yml index 3afef15..203c048 100644 --- a/.github/workflows/check_pr.yml +++ b/.github/workflows/check_pr.yml @@ -29,7 +29,8 @@ jobs: TYPE=$(jq -r '.type // "CNAME"' ${jsonfile}) URL=$(jq -r '.url' ${jsonfile}) if [ ${TYPE} = "CNAME" ] || [ -z ${TYPE} ]; then - if echo ${URL} | grep -qE '^https?://[^/]*/.*'; then + # We add a `.*[^/]$` at the end to allow URLs that end with '/' + if echo ${URL} | grep -qE '^https?://[^/]*/.*[^/]$'; then echo "URL in ${jsonfile} must not contain subdirectories for CNAME records." exit 1 fi