Skip to content

Commit

Permalink
🔧 fix(workflows): replace greq with awk
Browse files Browse the repository at this point in the history
  • Loading branch information
eshanized committed Jun 15, 2024
1 parent 26153f0 commit 9a88e15
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ jobs:
commit_emojis=("build"="🏗️" "chore"="🧹" "ci"="🤖" "docs"="📚" "feat"="🎉" "fix"="🔧" "perf"="⚡️" "refactor"="💡" "revert"="🚨" "style"="💄" "test"="🧪")
for type in "${conventional_types[@]}"; do
if echo "$LATEST_COMMIT_MESSAGE" | grep -qE "^${commit_emojis[$type]} ${type}(:|:)"; then
echo "Conventional commit message found: $LATEST_COMMIT_MESSAGE"
exit 0
if echo "$LATEST_COMMIT_MESSAGE" | awk -v emoji="${commit_emojis[$type]}" -v type="$type" '
BEGIN { pattern = "^" emoji " " type "(:|:)" }
/pattern/ { print "Conventional commit message found: " $0; exit 0 }
'; then
:
else
:
fi
done
Expand Down

0 comments on commit 9a88e15

Please sign in to comment.