7171
7272 echo "### 🔄 Rebuilding All Tutorial Agents" >> $GITHUB_STEP_SUMMARY
7373 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"
8277
8378 # Check each agent directory for changes
8479 for agent_dir in $all_agents; do
@@ -107,6 +102,12 @@ jobs:
107102 echo "agents=$agents_json" >> $GITHUB_OUTPUT
108103 echo "has_agents=true" >> $GITHUB_OUTPUT
109104
105+ # Debug outputs
106+ echo "DEBUG: Setting has_agents=true"
107+ echo "DEBUG: agents_json=$agents_json"
108+ echo "DEBUG: GITHUB_OUTPUT contents:"
109+ cat $GITHUB_OUTPUT
110+
110111 echo "" >> $GITHUB_STEP_SUMMARY
111112 for agent in "${agents_to_build[@]}"; do
112113 echo "- \`$agent\`" >> $GITHUB_STEP_SUMMARY
@@ -126,6 +127,12 @@ jobs:
126127
127128 name : build-${{ matrix.agent_path }}
128129 steps :
130+ - name : Debug inputs from find-agents
131+ run : |
132+ echo "DEBUG: Received has_agents = '${{ needs.find-agents.outputs.has_agents }}'"
133+ echo "DEBUG: Received agents = '${{ needs.find-agents.outputs.agents }}'"
134+ echo "DEBUG: Current matrix agent = '${{ matrix.agent_path }}'"
135+
129136 - name : Checkout repository
130137 uses : actions/checkout@v4
131138
@@ -178,7 +185,7 @@ jobs:
178185 echo "🚀 Building and pushing agent: ${{ matrix.agent_path }}"
179186 else
180187 SHOULD_PUSH=false
181- VERSION_TAG="${{ github.commit. sha }}"
188+ VERSION_TAG="${{ github.sha }}"
182189 echo "🔍 Validating build for agent: ${{ matrix.agent_path }}"
183190 fi
184191
0 commit comments