Compare commits

..

1 Commits

Author SHA1 Message Date
Sebastian Krupinski
966aa9f099 chore: initial workflow implementation
Some checks failed
Test Module Installation Action / Node.js Module with NPM (pull_request) Failing after 20s
Test Module Installation Action / Linear Dependencies (A → B → C) (pull_request) Failing after 1m10s
Test Module Installation Action / Single Module (No Dependencies) (pull_request) Failing after 1m26s
Test Module Installation Action / Error Handling (pull_request) Successful in 1m17s
Test Module Installation Action / PHP Module with Composer (pull_request) Failing after 1m29s
Test Module Installation Action / Mixed PHP and Node Modules (pull_request) Failing after 1m28s
Test Module Installation Action / Test Summary (pull_request) Failing after 3s
Signed-off-by: Sebastian Krupinski <root@LAPTOP-7DVOR6NC>
2026-02-15 16:49:37 -05:00

View File

@@ -212,42 +212,25 @@ runs:
')
REPO_URL=$(echo "$MODULE_INFO" | jq -r '.repo')
BRANCH=$(echo "$MODULE_INFO" | jq -r '.branch // empty')
BRANCH=$(echo "$MODULE_INFO" | jq -r '.branch // "main"')
MODULE_PATH="$INSTALL_PATH/$MODULE_NAME"
echo "Repository: $REPO_URL"
if [ -n "$BRANCH" ]; then
echo "Branch: $BRANCH"
else
echo "Branch: (repository default)"
fi
echo "Branch: $BRANCH"
echo "Path: $MODULE_PATH"
# Clone the repository
if [ -d "$MODULE_PATH" ]; then
echo "::warning::Directory $MODULE_PATH already exists, pulling latest changes..."
cd "$MODULE_PATH"
if [ -n "$BRANCH" ]; then
git pull origin "$BRANCH" || echo "::warning::Pull failed, continuing with existing code"
else
git pull || echo "::warning::Pull failed, continuing with existing code"
fi
git pull origin "$BRANCH" || echo "::warning::Pull failed, continuing with existing code"
cd - > /dev/null
else
if [ -n "$BRANCH" ]; then
if git clone --branch "$BRANCH" --depth 1 "$REPO_URL" "$MODULE_PATH"; then
echo "✓ Cloned $MODULE_NAME successfully"
else
echo "::error::Failed to clone $MODULE_NAME from $REPO_URL (branch: $BRANCH)"
exit 1
fi
if git clone --branch "$BRANCH" --depth 1 "$REPO_URL" "$MODULE_PATH"; then
echo "✓ Cloned $MODULE_NAME successfully"
else
if git clone --depth 1 "$REPO_URL" "$MODULE_PATH"; then
echo "✓ Cloned $MODULE_NAME successfully"
else
echo "::error::Failed to clone $MODULE_NAME from $REPO_URL"
exit 1
fi
echo "::error::Failed to clone $MODULE_NAME from $REPO_URL (branch: $BRANCH)"
exit 1
fi
fi
done