diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index 2621fff..2fdd242 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -25,7 +25,7 @@ jobs: commit_emojis=("build"="๐Ÿ—๏ธ" "chore"="๐Ÿงน" "ci"="๐Ÿค–" "docs"="๐Ÿ“š" "feat"="๐ŸŽ‰" "fix"="๐Ÿ”ง" "perf"="โšก๏ธ" "refactor"="๐Ÿ’ก" "revert"="๐Ÿšจ" "style"="๐Ÿ’„" "test"="๐Ÿงช") for type in "${conventional_types[@]}"; do - if [[ $LATEST_COMMIT_MESSAGE == *"${commit_emojis[$type]} $type:"* ]] || [[ $LATEST_COMMIT_MESSAGE == *"${commit_emojis[$type]} $type("* ]]; then + if echo "$LATEST_COMMIT_MESSAGE" | grep -qE "^${commit_emojis[$type]} ${type}(:|:)"; then echo "Conventional commit message found: $LATEST_COMMIT_MESSAGE" exit 0 fi