|
71 | 71 |
|
72 | 72 | echo "### 🔄 Rebuilding All Tutorial Agents" >> $GITHUB_STEP_SUMMARY |
73 | 73 | else |
74 | | - # Determine the base branch for comparison |
75 | | - if [ "${{ github.event_name }}" = "pull_request" ]; then |
76 | | - BASE_BRANCH="origin/${{ github.base_ref }}" |
77 | | - echo "Comparing against PR base branch: $BASE_BRANCH" |
78 | | - else |
79 | | - BASE_BRANCH="HEAD~1" |
80 | | - echo "Comparing against previous commit: $BASE_BRANCH" |
81 | | - fi |
| 74 | + # Always compare against main branch |
| 75 | + BASE_BRANCH="origin/main" |
| 76 | + echo "Comparing against main branch: $BASE_BRANCH" |
82 | 77 |
|
83 | 78 | # Check each agent directory for changes |
84 | 79 | for agent_dir in $all_agents; do |
@@ -190,17 +185,17 @@ jobs: |
190 | 185 | echo "🚀 Building and pushing agent: ${{ matrix.agent_path }}" |
191 | 186 | else |
192 | 187 | SHOULD_PUSH=false |
193 | | - VERSION_TAG="${{ github.commit.sha }}" |
| 188 | + VERSION_TAG="${{ github.sha }}" |
194 | 189 | echo "🔍 Validating build for agent: ${{ matrix.agent_path }}" |
195 | 190 | fi |
196 | 191 |
|
197 | 192 | # Build command - add --push only if we should push |
198 | 193 | BUILD_ARGS="--manifest ${{ matrix.agent_path }}/manifest.yaml --registry ${REGISTRY} --tag ${VERSION_TAG} --platforms linux/amd64 --repository-name ${REPOSITORY_NAME}" |
199 | 194 |
|
200 | 195 | if [ "$SHOULD_PUSH" = "true" ]; then |
201 | | - agentex agents build $BUILD_ARGS --push |
| 196 | + agentex agents build "$BUILD_ARGS" --push |
202 | 197 | echo "✅ Successfully built and pushed: ${REGISTRY}/${REPOSITORY_NAME}:${VERSION_TAG}" |
203 | 198 | else |
204 | | - agentex agents build $BUILD_ARGS |
| 199 | + agentex agents build "$BUILD_ARGS" |
205 | 200 | echo "✅ Build validation successful for: ${{ matrix.agent_path }}" |
206 | 201 | fi |
0 commit comments