From b91f6e6b2526dd60610a2448a57ceafcba2a8011 Mon Sep 17 00:00:00 2001 From: amithkoujalgi Date: Sat, 30 Aug 2025 18:06:06 +0530 Subject: [PATCH] Enhance GitHub Actions workflow for dynamic branch testing - Added a step to check out the target branch specified in the workflow input. - Implemented a conditional step to use the workflow file from the checked-out branch, improving flexibility and error handling in CI processes. --- .github/workflows/run-tests.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 044436e..a2666c7 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -16,10 +16,22 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout target branch + uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.branch }} + - name: Use workflow from checked out branch + run: | + if [ -f .github/workflows/run-tests.yml ]; then + echo "Using workflow from checked out branch." + cp .github/workflows/run-tests.yml /tmp/run-tests.yml + exit 0 + else + echo "Workflow file not found in checked out branch." + exit 1 + fi + - name: Set up Ollama run: | curl -fsSL https://ollama.com/install.sh | sh