|
@@ -14,17 +14,23 @@ runs:
|
|
|
# Get repository tree without cloning
|
|
# Get repository tree without cloning
|
|
|
TREE_URL="https://api.github.com/repos/$REPO/git/trees/$BRANCH?recursive=1"
|
|
TREE_URL="https://api.github.com/repos/$REPO/git/trees/$BRANCH?recursive=1"
|
|
|
|
|
|
|
|
- MAKEFILE_PATH=$(curl -s "$TREE_URL" | \
|
|
|
|
|
- jq -r '.tree[].path' | \
|
|
|
|
|
- grep 'Makefile$' | \
|
|
|
|
|
- head -n 1)
|
|
|
|
|
|
|
+ MAKEFILES=$(curl -s "$TREE_URL" | jq -r '.tree[].path' | grep 'Makefile$')
|
|
|
|
|
|
|
|
- if [ -z "$MAKEFILE_PATH" ]; then
|
|
|
|
|
- echo "::error::Could not find root Makefile"
|
|
|
|
|
- exit 1
|
|
|
|
|
|
|
+ for file in $MAKEFILES; do
|
|
|
|
|
+ CONTENT=$(curl -s "https://raw.githubusercontent.com/$REPO/$BRANCH/$file")
|
|
|
|
|
+
|
|
|
|
|
+ if echo "$CONTENT" | grep -q '^VERSION[[:space:]]*='; then
|
|
|
|
|
+ MAKEFILE_PATH="$file"
|
|
|
|
|
+ break
|
|
|
fi
|
|
fi
|
|
|
|
|
+ done
|
|
|
|
|
|
|
|
- echo "Found: $MAKEFILE_PATH"
|
|
|
|
|
|
|
+ if [ -z "$MAKEFILE_PATH" ]; then
|
|
|
|
|
+ echo "::error::Could not find kernel Makefile"
|
|
|
|
|
+ exit 1
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
|
|
+ echo "Found kernel Makefile: $MAKEFILE_PATH"
|
|
|
|
|
|
|
|
# Download only the Makefile
|
|
# Download only the Makefile
|
|
|
RAW_URL="https://raw.githubusercontent.com/$REPO/$BRANCH/$MAKEFILE_PATH"
|
|
RAW_URL="https://raw.githubusercontent.com/$REPO/$BRANCH/$MAKEFILE_PATH"
|