99 type : string
1010 default : main
1111
12- jobs :
13- build-images :
14- name : " Build AgentEx Images"
15- uses : ./.github/workflows/build-agentex.yml
16- with :
17- commit-sha : ${{ inputs.commit-sha || 'main' }}
12+ permissions :
13+ contents : read
14+ packages : read
1815
16+ jobs :
17+ # build-images:
18+ # name: "Build AgentEx Images"
19+ # uses: ./.github/workflows/build-agentex.yml
20+ # with:
21+ # commit-sha: ${{ inputs.commit-sha || 'main' }}
22+ #
1923 pull-agent-images :
2024 name : " Pull AgentEx Images"
21- needs : build-images
2225 runs-on : ubuntu-latest
2326 steps :
2427 - name : Login to GitHub Container Registry
@@ -28,44 +31,58 @@ jobs:
2831 username : ${{ github.repository_owner }}
2932 password : ${{ secrets.GITHUB_TOKEN }}
3033
31- - name : Discover available images
32- id : discover
34+ - name : Discover and pull agentex-python packages
35+ env :
36+ GH_TOKEN : ${{ github.token }}
3337 run : |
34- echo "🔍 Discovering available images ..."
38+ echo "🔍 Discovering packages from agentex-python repo ..."
3539
36- # Get packages, excluding the current repo to avoid conflicts
37- PACKAGES=$(gh api repos/scaleapi/agentex-python/packages?package_type=container --jq '.[].name') echo "📦 Available packages:"
38- echo "$PACKAGES"
40+ # Get package names using the API query
41+ PACKAGES=$(gh api "orgs/scaleapi/packages?package_type=container" --jq '.[] | select(.repository.name == "agentex-python") | .name')
3942
40- # Store for other jobs
41- echo "images<<EOF" >> $GITHUB_OUTPUT
42- echo "$PACKAGES" >> $GITHUB_OUTPUT
43- echo "EOF" >> $GITHUB_OUTPUT
43+ if [ -z "$PACKAGES" ]; then
44+ echo "❌ No packages found in agentex-python repo"
45+ exit 0
46+ fi
4447
45- # # Pull images
46- # for package in $PACKAGES; do
47- # echo "🐳 Pulling ghcr.io/${{ github.repository_owner }}/$package:latest"
48- # docker pull "ghcr.io/${{ github.repository_owner }}/$package:latest" || echo "⚠️ Couldn't pull $package:latest, trying main..."
49- # docker pull "ghcr.io/${{ github.repository_owner }}/$package:main" 2>/dev/null || echo "ℹ️ $package:main not available"
50- # done
51- #
52- - name : Pull images from GHCR
53- run : |
54- docker pull ghcr.io/your-org/repo-name/image-name:tag
55- docker pull ghcr.io/your-org/another-repo/service:latest
48+ echo "📦 Found packages:"
49+ echo "$PACKAGES"
5650
57- run-integration-tests :
58- name : " Run Integration Tests"
59- needs : build-images
60- runs-on : ubuntu-latest
61- steps :
62- - name : Checkout
63- uses : actions/checkout@v4
64- with :
65- ref : ${{ inputs.commit-sha || 'main' }}
51+ # Pull each package
52+ for package in $PACKAGES; do
53+ echo "🐳 Pulling ghcr.io/scaleapi/$package:latest"
54+ docker pull "ghcr.io/scaleapi/$package:latest" || echo "⚠️ Failed to pull $package:latest"
55+ done
6656
67- - name : Placeholder - Integration Tests
57+ - name : Show pulled images
6858 run : |
69- echo "🧪 Integration tests will run here"
70- echo "📦 AgentEx images have been built with commit SHA: ${{ inputs.commit-sha || 'main' }}"
71- echo "🔄 This is where actual integration test commands should be added"
59+ echo "🐳 Successfully pulled images:"
60+ docker images | grep "ghcr.io/scaleapi" || echo "No scaleapi images found"
61+
62+ # run-integration-tests:
63+ # name: "Run Integration Tests"
64+ # needs: pull-agent-images
65+ # runs-on: ubuntu-latest
66+ # steps:
67+ # - name: Checkout
68+ # uses: actions/checkout@v4
69+ # with:
70+ # ref: ${{ inputs.commit-sha || 'main' }}
71+ #
72+ # - name: Login to GitHub Container Registry
73+ # uses: docker/login-action@v3
74+ # with:
75+ # registry: ghcr.io
76+ # username: ${{ github.repository_owner }}
77+ # password: ${{ secrets.GITHUB_TOKEN }}
78+ #
79+ # - name: Verify available images
80+ # run: |
81+ # echo "🐳 Available Docker images for testing:"
82+ # docker images | grep "ghcr.io/scaleapi" || echo "No scaleapi images available"
83+ #
84+ # - name: Placeholder - Integration Tests
85+ # run: |
86+ # echo "🧪 Integration tests will run here"
87+ # echo "📦 AgentEx Python dependency images are available for testing"
88+ # echo "🔄 This is where actual integration test commands should be added"
0 commit comments