Ver Fonte

Fix Makefile path matching in action.yml

Update grep pattern to match Makefile at the end of the path.
jimsterino98 há 1 mês atrás
pai
commit
f6ff360358
1 ficheiros alterados com 3 adições e 2 exclusões
  1. 3 2
      .github/actions/kernel-info/action.yml

+ 3 - 2
.github/actions/kernel-info/action.yml

@@ -15,8 +15,9 @@ runs:
         TREE_URL="https://api.github.com/repos/$REPO/git/trees/$BRANCH?recursive=1"
 
         MAKEFILE_PATH=$(curl -s "$TREE_URL" | \
-          jq -r '.tree[].path' | \
-          grep -x "Makefile")
+        jq -r '.tree[].path' | \
+        grep 'Makefile$' | \
+        head -n 1)
 
         if [ -z "$MAKEFILE_PATH" ]; then
           echo "::error::Could not find root Makefile"