Skip to content

Commit c039602

Browse files
committed
final version
1 parent 4749863 commit c039602

File tree

2 files changed

+13
-87
lines changed

2 files changed

+13
-87
lines changed

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,35 @@ jobs:
5151
curl -LsSf https://astral.sh/uv/install.sh | sh
5252
echo "$HOME/.local/bin" >> $GITHUB_PATH
5353
54+
- name: Pull latest AgentEx image
55+
run: |
56+
echo "🐳 Pulling latest Scale AgentEx Docker image..."
57+
docker pull ghcr.io/scaleapi/scale-agentex/agentex:latest
58+
echo "✅ Successfully pulled AgentEx Docker image"
59+
5460
- name: Checkout scale-agentex repo
5561
uses: actions/checkout@v4
5662
with:
5763
repository: scaleapi/scale-agentex
5864
path: scale-agentex
5965

60-
- name: Configure Docker Compose for host networking
66+
- name: Configure Docker Compose for pulled image and host networking
6167
run: |
6268
cd scale-agentex/agentex
63-
echo "🔧 Configuring AgentEx container for GitHub Actions networking..."
69+
echo "🔧 Configuring AgentEx container to use pulled image and host networking..."
6470
6571
# Install yq for YAML manipulation
6672
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
6773
sudo chmod +x /usr/local/bin/yq
6874
75+
# Override to use pulled image instead of building
76+
yq eval '.services.agentex.image = "ghcr.io/scaleapi/scale-agentex/agentex:latest"' -i docker-compose.yml
77+
yq eval 'del(.services.agentex.build)' -i docker-compose.yml
78+
6979
# Add extra_hosts to agentex service to make host.docker.internal work
7080
yq eval '.services.agentex.extra_hosts = ["host.docker.internal:host-gateway"]' -i docker-compose.yml
7181
72-
echo "✅ Added extra_hosts configuration to agentex service"
82+
echo "✅ Configured docker-compose to use pulled image with host access"
7383
7484
- name: Start AgentEx Server
7585
run: |

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

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -28,87 +28,3 @@ on:
2828
permissions:
2929
contents: read
3030
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)