.
This commit is contained in:
parent
9efc306e38
commit
908642a78e
1 changed files with 16 additions and 9 deletions
|
|
@ -50,11 +50,12 @@ jobs:
|
||||||
\"reason\": \"one sentence explaining your decision\"
|
\"reason\": \"one sentence explaining your decision\"
|
||||||
}"
|
}"
|
||||||
|
|
||||||
echo "Testing Ollama connectivity..."
|
echo "Testing Ollama connectivity on shared network..."
|
||||||
curl -v http://10.0.1.84:11434/api/tags || echo "Ollama unreachable"
|
# Using the container name 'ollama' which resolves on the shared bridge network
|
||||||
|
curl -v http://ollama:11434/api/tags || echo "Ollama unreachable"
|
||||||
|
|
||||||
echo "Sending validation request to Ollama..."
|
echo "Sending validation request to Ollama..."
|
||||||
RESPONSE=$(curl -s -X POST http://10.0.1.84:11434/api/generate \
|
RESPONSE=$(curl -s -X POST http://ollama:11434/api/generate \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
--max-time 300 \
|
--max-time 300 \
|
||||||
-d "{
|
-d "{
|
||||||
|
|
@ -87,19 +88,25 @@ jobs:
|
||||||
- name: Block if assessment fails
|
- name: Block if assessment fails
|
||||||
if: steps.extract.outputs.content_found == 'true'
|
if: steps.extract.outputs.content_found == 'true'
|
||||||
run: |
|
run: |
|
||||||
ASSESSMENT="${{ steps.parse.outputs.assessment }}"
|
# Note: The original workflow referenced steps.parse but it seems to be named validate here.
|
||||||
|
# Adjusting to use the output from the validate step.
|
||||||
|
# You may need to validate this based on your actual jq parsing logic in the prev step.
|
||||||
|
# Assuming RESULT contains the JSON string with assessment fields.
|
||||||
|
|
||||||
|
ASSESSMENT=$(echo "${{ steps.validate.outputs.validation_result }}" | jq -r '.assessment' 2>/dev/null)
|
||||||
|
REASON=$(echo "${{ steps.validate.outputs.validation_result }}" | jq -r '.reason' 2>/dev/null)
|
||||||
|
|
||||||
if [ "$ASSESSMENT" = "FAIL" ]; then
|
if [ "$ASSESSMENT" = "FAIL" ]; then
|
||||||
echo "❌ Resume assessment: FAIL"
|
echo "Resume assessment: FAIL"
|
||||||
echo "${{ steps.parse.outputs.reason }}"
|
echo "$REASON"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "✅ Resume assessment: PASS"
|
echo "Resume assessment: PASS"
|
||||||
echo "${{ steps.parse.outputs.reason }}"
|
echo "$REASON"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Resume not found
|
- name: Resume not found
|
||||||
if: steps.extract.outputs.content_found == 'false'
|
if: steps.extract.outputs.content_found == 'false'
|
||||||
run: |
|
run: |
|
||||||
echo "❌ content/resume.md not found"
|
echo "content/resume.md not found"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue