From 103d596bba616b44d9b83c56b552c56a7877be32 Mon Sep 17 00:00:00 2001 From: appel_c Date: Tue, 23 Sep 2025 22:32:45 -0500 Subject: [PATCH] fix: add log file for checkout BEC plugin repository --- action.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 96ee0fe..4d8420a 100644 --- a/action.yml +++ b/action.yml @@ -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 ../