From 40b677e3ed101b7c244d8a6ec49d64e48070e2f7 Mon Sep 17 00:00:00 2001 From: tligui_y Date: Tue, 12 Aug 2025 11:17:08 +0200 Subject: [PATCH] Update action.yml --- action.yml | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/action.yml b/action.yml index c49b69f..5c1ee66 100644 --- a/action.yml +++ b/action.yml @@ -41,6 +41,11 @@ inputs: required: false default: "" + custom_shell_commands_after: + description: "Additional shell commands to run" + required: false + default: "" + test-files: description: "Comma-separated list of test files or directories to run" required: false @@ -111,12 +116,12 @@ runs: pixi list >> $LOG_FILE echo "Exit Code: 0" >> $LOG_FILE - - name: Run custom shell commands + - name: Run custom shell commands before if: inputs.custom_shell_commands != '' shell: bash run: | OUTPUT_DIR="outputs" - LOG_FILE="${OUTPUT_DIR}/custom-shell.log" + LOG_FILE="${OUTPUT_DIR}/custom-shell_before.log" mkdir -p "$OUTPUT_DIR" @@ -263,13 +268,27 @@ runs: rm -rf ./temp-test-ci echo "Exit Code: 0" >> $LOG_FILE - - name: Cleanup DBus - if: always() + - name: Run custom shell commands after + if: inputs.custom_shell_commands_after != '' shell: bash run: | - echo "Killing DBus..." - kill "$DBUS_SESSION_BUS_PID" 2>/dev/null || true - pkill -f dbus-daemon 2>/dev/null || true + OUTPUT_DIR="outputs" + LOG_FILE="${OUTPUT_DIR}/custom-shell_after.log" + + mkdir -p "$OUTPUT_DIR" + + echo "📜 Executing custom shell commands..." + echo "${{ inputs.custom_shell_commands_after }}" >> custom_commands_bis.sh + chmod +x custom_commands_bis.sh + + # bash -e ./custom_commands_bis.sh >> $LOG_FILE 2>&1 + + ./custom_commands_bis.sh >> $LOG_FILE 2>&1 + + cat $LOG_FILE + + echo "✅ Custom shell executed" >> $LOG_FILE + echo "Exit Code: 0" >> $LOG_FILE - name: Commit and push reports shell: bash