mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-09-16 03:39:05 +02:00
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.
This commit is contained in:
parent
0ec20d14b0
commit
b91f6e6b25
14
.github/workflows/run-tests.yml
vendored
14
.github/workflows/run-tests.yml
vendored
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user