forked from Mirror/ollama4j
		
	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:
		
							
								
								
									
										14
									
								
								.github/workflows/run-tests.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.github/workflows/run-tests.yml
									
									
									
									
										vendored
									
									
								
							| @@ -16,10 +16,22 @@ jobs: | |||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|  |  | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v3 |       - name: Checkout target branch | ||||||
|  |         uses: actions/checkout@v3 | ||||||
|         with: |         with: | ||||||
|           ref: ${{ github.event.inputs.branch }} |           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 |       - name: Set up Ollama | ||||||
|         run: | |         run: | | ||||||
|           curl -fsSL https://ollama.com/install.sh | sh |           curl -fsSL https://ollama.com/install.sh | sh | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 amithkoujalgi
					amithkoujalgi