Skip to content

Commit 4059f47

Browse files
committed
using the latest image that is pulled
1 parent 4749863 commit 4059f47

File tree

2 files changed

+19
-129
lines changed

2 files changed

+19
-129
lines changed

.github/workflows/agentex-tutorials-test.yml

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -51,47 +51,23 @@ jobs:
5151
curl -LsSf https://astral.sh/uv/install.sh | sh
5252
echo "$HOME/.local/bin" >> $GITHUB_PATH
5353
54-
- name: Checkout scale-agentex repo
55-
uses: actions/checkout@v4
56-
with:
57-
repository: scaleapi/scale-agentex
58-
path: scale-agentex
59-
60-
- name: Configure Docker Compose for host networking
54+
- name: Pull Scale AgentEx Docker image
6155
run: |
62-
cd scale-agentex/agentex
63-
echo "🔧 Configuring AgentEx container for GitHub Actions networking..."
64-
65-
# Install yq for YAML manipulation
66-
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
67-
sudo chmod +x /usr/local/bin/yq
68-
69-
# Add extra_hosts to agentex service to make host.docker.internal work
70-
yq eval '.services.agentex.extra_hosts = ["host.docker.internal:host-gateway"]' -i docker-compose.yml
56+
echo "🐳 Pulling Scale AgentEx Docker image..."
57+
docker pull ghcr.io/scaleapi/scale-agentex/agentex:latest
58+
echo "✅ Successfully pulled AgentEx Docker image"
7159
72-
echo "✅ Added extra_hosts configuration to agentex service"
73-
74-
- name: Start AgentEx Server
60+
- name: Start AgentEx Server from Docker image
7561
run: |
76-
cd scale-agentex/agentex
77-
echo "🚀 Starting AgentEx server and dependencies..."
78-
79-
# Start all services
80-
docker compose up -d
81-
82-
echo "⏳ Waiting for dependencies to be healthy..."
62+
echo "🚀 Starting AgentEx server from Docker image..."
8363
84-
# Wait for services to be healthy
85-
for i in {1..30}; do
86-
if docker compose ps | grep -q "healthy"; then
87-
echo "✅ Dependencies are healthy"
88-
break
89-
fi
90-
echo " Attempt $i/30: Waiting for services..."
91-
sleep 5
92-
done
64+
# Start the AgentEx container with host networking for GitHub Actions
65+
docker run -d \
66+
--name agentex-server \
67+
--add-host=host.docker.internal:host-gateway \
68+
-p 5003:5003 \
69+
ghcr.io/scaleapi/scale-agentex/agentex:latest
9370
94-
# Wait specifically for AgentEx server to be ready
9571
echo "⏳ Waiting for AgentEx server to be ready..."
9672
for i in {1..30}; do
9773
if curl -s --max-time 5 http://localhost:5003/health >/dev/null 2>&1; then
@@ -102,6 +78,13 @@ jobs:
10278
sleep 5
10379
done
10480
81+
# Verify the server is responding
82+
if ! curl -s --max-time 5 http://localhost:5003/health >/dev/null 2>&1; then
83+
echo "❌ AgentEx server failed to start or is not responding"
84+
docker logs agentex-server
85+
exit 1
86+
fi
87+
10588
- name: Build AgentEx SDK
10689
run: |
10790
echo "🔨 Building AgentEx SDK wheel..."

.github/workflows/build-and-push-tutorial-agent.yml

Lines changed: 0 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -19,96 +19,3 @@ on:
1919
description: "Path to the agent directory"
2020
required: true
2121
type: string
22-
version_tag:
23-
description: "Version tag for the agent build"
24-
required: true
25-
type: string
26-
default: "latest"
27-
28-
permissions:
29-
contents: read
30-
packages: write
31-
32-
jobs:
33-
build-and-push-agent:
34-
timeout-minutes: 10
35-
name: Build Tutorial Agent
36-
runs-on: ubuntu-latest
37-
38-
steps:
39-
- name: Checkout repository
40-
uses: actions/checkout@v4
41-
42-
- name: Validate agent path exists
43-
run: |
44-
if [ ! -d "${{ inputs.agent_path }}" ]; then
45-
echo "❌ Error: Agent path '${{ inputs.agent_path }}' does not exist"
46-
exit 1
47-
fi
48-
echo "✅ Agent path verified: ${{ inputs.agent_path }}"
49-
50-
- name: Validate manifest.yaml exists
51-
run: |
52-
if [ ! -f "${{ inputs.agent_path }}/manifest.yaml" ]; then
53-
echo "❌ Error: manifest.yaml not found in '${{ inputs.agent_path }}'"
54-
exit 1
55-
fi
56-
echo "✅ manifest.yaml found"
57-
echo "### Validation Summary" >> $GITHUB_STEP_SUMMARY
58-
echo "- **Agent Path**: ${{ inputs.agent_path }}" >> $GITHUB_STEP_SUMMARY
59-
echo "- **Version Tag**: ${{ inputs.version_tag }}" >> $GITHUB_STEP_SUMMARY
60-
echo "- **Status**: ✅ Validation passed" >> $GITHUB_STEP_SUMMARY
61-
62-
- name: Set up Docker Buildx
63-
uses: docker/setup-buildx-action@v3
64-
65-
- name: Set up Python
66-
uses: actions/setup-python@v4
67-
with:
68-
python-version: "3.12"
69-
70-
- name: Get latest agentex-sdk version from PyPI
71-
id: get-version
72-
run: |
73-
LATEST_VERSION=$(curl -s https://pypi.org/pypi/agentex-sdk/json | jq -r '.info.version')
74-
echo "Latest agentex-sdk version: $LATEST_VERSION"
75-
echo "AGENTEX_SDK_VERSION=$LATEST_VERSION" >> $GITHUB_ENV
76-
pip install agentex-sdk==$LATEST_VERSION
77-
echo "Installed agentex-sdk version $LATEST_VERSION"
78-
79-
- name: Generate Image name
80-
id: image-name
81-
run: |
82-
# Remove examples/tutorials/ prefix and replace / with -
83-
AGENT_NAME=$(echo "${{ inputs.agent_path }}" | sed 's|^examples/tutorials/||' | sed 's|/|-|g')
84-
echo "AGENT_NAME=$AGENT_NAME" >> $GITHUB_ENV
85-
echo "agent_name=$AGENT_NAME" >> $GITHUB_OUTPUT
86-
echo "Agent name set to $AGENT_NAME"
87-
88-
- name: Login to GitHub Container Registry
89-
uses: docker/login-action@v3
90-
with:
91-
registry: ghcr.io
92-
username: ${{ github.actor }}
93-
password: ${{ secrets.GITHUB_TOKEN }}
94-
95-
- name: Build and Push Agent Image
96-
env:
97-
REGISTRY: ghcr.io
98-
run: |
99-
AGENT_NAME="${{ steps.image-name.outputs.agent_name }}"
100-
VERSION_TAG="${{ inputs.version_tag }}"
101-
REPOSITORY_NAME="${{ github.repository }}/tutorial-agents/${AGENT_NAME}"
102-
FULL_IMAGE="${REGISTRY}/${REPOSITORY_NAME}:${VERSION_TAG}"
103-
104-
agentex agents build \
105-
--manifest "${{ inputs.agent_path }}/manifest.yaml" \
106-
--registry "${REGISTRY}" \
107-
--tag "${VERSION_TAG}" \
108-
--platforms "linux/amd64" \
109-
--repository-name "${REPOSITORY_NAME}" \
110-
--push
111-
112-
echo "Successfully built and pushed: ${FULL_IMAGE}"
113-
echo "### Build Complete" >> $GITHUB_STEP_SUMMARY
114-
echo "- **Image**: \`${FULL_IMAGE}\`" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)