Skip to content

Commit 33d3596

Browse files
author
Krzysztof Dziedzic
committed
mount git to itk
1 parent 15fb9b7 commit 33d3596

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/itk.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- 'src/**'
99
- 'itk/**'
1010
- 'pyproject.toml'
11+
- '.git'
1112

1213
permissions:
1314
contents: read

itk/run_itk.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ cleanup() {
2121
trap cleanup EXIT
2222

2323
# 1. Pull a2a-samples and checkout revision
24-
: "${A2A_SAMPLES_REVISION:?A2A_SAMPLES_REVISION environment variable must be set}"
24+
: "${A2A_SAMPLES_REVISION:=$(grep "A2A_SAMPLES_REVISION:" ../.github/workflows/itk.yaml | head -n 1 | awk '{print $2}')}"
2525

2626
if [ ! -d "a2a-samples" ]; then
2727
git clone https://github.com/a2aproject/a2a-samples.git a2a-samples
@@ -59,13 +59,15 @@ docker build -t itk_service a2a-samples/itk
5959
# Mounting a2a-python as repo and itk as current agent
6060
A2A_PYTHON_ROOT=$(cd .. && pwd)
6161
ITK_DIR=$(pwd)
62+
REPO_ROOT=$(cd ../.. && pwd)
6263

6364
# Stop existing container if any
6465
docker rm -f itk-service || true
6566

6667
docker run -d --name itk-service \
6768
-v "$A2A_PYTHON_ROOT:/app/agents/repo" \
6869
-v "$ITK_DIR:/app/agents/repo/itk" \
70+
-v "$REPO_ROOT/.git:/app/agents/repo/.git" \
6971
-p 8000:8000 \
7072
itk_service
7173

0 commit comments

Comments
 (0)