fix: add log file for checkout BEC plugin repository

This commit is contained in:
2025-09-23 22:32:45 -05:00
parent ae52c4c7ca
commit 103d596bba

View File

@@ -37,16 +37,24 @@ runs:
shell: bash
id: plugin_checkout
run: |
# Create log directory
OUTPUT_DIR="outputs"
LOG_FILE="${OUTPUT_DIR}/checkout.log"
mkdir -p "$OUTPUT_DIR"
# Create a temporary directory for the plugin repository
mkdir -p ./_plugin_checkout_/
cd ./_plugin_checkout_/
echo "Cloning repository: ${{ inputs.BEC_PLUGIN_REPO_URL }}" >> $LOG_FILE 2>&1
echo "Using branch: ${{ inputs.BEC_PLUGIN_REPO_BRANCH }}" >> $LOG_FILE 2>&1
# Clone the repository with fallback for branch
if git clone --depth 1 --branch "${{ inputs.BEC_PLUGIN_REPO_BRANCH }}" "${{ inputs.BEC_PLUGIN_REPO_URL }}"; then
echo "Successfully cloned with branch ${{ inputs.BEC_PLUGIN_REPO_BRANCH }}"
if git clone --depth 1 --branch "${{ inputs.BEC_PLUGIN_REPO_BRANCH }}" "${{ inputs.BEC_PLUGIN_REPO_URL }}" >> $LOG_FILE 2>&1; then
echo "Successfully cloned with branch ${{ inputs.BEC_PLUGIN_REPO_BRANCH }}" >> $LOG_FILE 2>&1
else
echo "Failed to clone with branch ${{ inputs.BEC_PLUGIN_REPO_BRANCH }}, trying without specific branch"
git clone --depth 1 "${{ inputs.BEC_PLUGIN_REPO_URL }}"
echo "Failed to clone with branch ${{ inputs.BEC_PLUGIN_REPO_BRANCH }}, trying without specific branch" >> $LOG_FILE 2>&1
git clone --depth 1 "${{ inputs.BEC_PLUGIN_REPO_URL }}" >> $LOG_FILE 2>&1
fi
cd ../