mirror of
https://github.com/Snigdha-OS/snigdhaos-arctic.git
synced 2025-09-21 03:55:04 +02:00
🔧 fix(workflows): replace greq with awk
This commit is contained in:
10
.github/workflows/commit.yml
vendored
10
.github/workflows/commit.yml
vendored
@@ -25,9 +25,13 @@ jobs:
|
|||||||
commit_emojis=("build"="🏗️" "chore"="🧹" "ci"="🤖" "docs"="📚" "feat"="🎉" "fix"="🔧" "perf"="⚡️" "refactor"="💡" "revert"="🚨" "style"="💄" "test"="🧪")
|
commit_emojis=("build"="🏗️" "chore"="🧹" "ci"="🤖" "docs"="📚" "feat"="🎉" "fix"="🔧" "perf"="⚡️" "refactor"="💡" "revert"="🚨" "style"="💄" "test"="🧪")
|
||||||
|
|
||||||
for type in "${conventional_types[@]}"; do
|
for type in "${conventional_types[@]}"; do
|
||||||
if echo "$LATEST_COMMIT_MESSAGE" | grep -qE "^${commit_emojis[$type]} ${type}(:|:)"; then
|
if echo "$LATEST_COMMIT_MESSAGE" | awk -v emoji="${commit_emojis[$type]}" -v type="$type" '
|
||||||
echo "Conventional commit message found: $LATEST_COMMIT_MESSAGE"
|
BEGIN { pattern = "^" emoji " " type "(:|:)" }
|
||||||
exit 0
|
/pattern/ { print "Conventional commit message found: " $0; exit 0 }
|
||||||
|
'; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
:
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user