3434 outputs :
3535 has_major_updates : ${{ steps.check.outputs.has_major_updates }}
3636 major_packages : ${{ steps.check.outputs.major_packages }}
37+ has_pr_changes : ${{ steps.pending.outputs.has_changes }}
3738
3839 steps :
3940 - name : Checkout Code
@@ -67,11 +68,11 @@ jobs:
6768 run : |
6869 cd packages/template-generator
6970
70- # Scheduled runs should auto-open PRs with safe updates by default .
71+ # Scheduled runs should keep dependency update PRs aligned with the newest stable versions .
7172 EFFECTIVE_UPDATE_MODE="${{ inputs.update_mode }}"
7273 if [ -z "$EFFECTIVE_UPDATE_MODE" ]; then
7374 if [ "${{ github.event_name }}" = "schedule" ]; then
74- EFFECTIVE_UPDATE_MODE="patch-minor "
75+ EFFECTIVE_UPDATE_MODE="all "
7576 else
7677 EFFECTIVE_UPDATE_MODE="check-only"
7778 fi
@@ -99,17 +100,10 @@ jobs:
99100 echo "major_packages=" >> "$GITHUB_OUTPUT"
100101 fi
101102
102- # Store the report
103- {
104- echo 'report<<EOF'
105- cat ../deps-report.md
106- echo EOF
107- } >> "$GITHUB_OUTPUT"
108-
109103 - name : Display Report
110104 run : |
111105 echo "## Dependency Check Report"
112- echo "${{ steps.check.outputs. report }}"
106+ cat packages/deps- report.md
113107
114108 - name : Apply Updates (if requested)
115109 if : steps.check.outputs.effective_update_mode == 'patch-minor' || steps.check.outputs.effective_update_mode == 'all'
@@ -122,12 +116,52 @@ jobs:
122116 bun run scripts/check-deps.ts --apply-all || true
123117 fi
124118
119+ - name : Sync Templates And Verification Artifacts
120+ if : steps.check.outputs.effective_update_mode == 'patch-minor' || steps.check.outputs.effective_update_mode == 'all'
121+ run : |
122+ bun run --cwd packages/template-generator sync-versions:fix
123+ bun run --cwd packages/template-generator sync-versions
124+ bun run --cwd packages/types build
125+ bun run --cwd packages/template-generator build
126+ bun test apps/cli/test/template-snapshots.test.ts -u
127+ bun test apps/cli/test/cli-builder-sync.test.ts
128+ bun test apps/web/test/preview-config.test.ts
129+
130+ - name : Regenerate Dependency Report
131+ if : steps.check.outputs.effective_update_mode == 'patch-minor' || steps.check.outputs.effective_update_mode == 'all'
132+ run : |
133+ cd packages/template-generator
134+
135+ if [ -n "${{ inputs.ecosystem }}" ]; then
136+ bun run scripts/check-deps.ts --markdown --ecosystem "${{ inputs.ecosystem }}" > ../deps-report.md || true
137+ else
138+ bun run scripts/check-deps.ts --markdown > ../deps-report.md || true
139+ fi
140+
141+ - name : Determine Pending Changes
142+ id : pending
143+ run : |
144+ if git diff --quiet; then
145+ echo "has_changes=false" >> "$GITHUB_OUTPUT"
146+ else
147+ echo "has_changes=true" >> "$GITHUB_OUTPUT"
148+ fi
149+
150+ - name : Capture Final Report
151+ id : final-report
152+ run : |
153+ {
154+ echo 'report<<EOF'
155+ cat packages/deps-report.md
156+ echo EOF
157+ } >> "$GITHUB_OUTPUT"
158+
125159 - name : Disable Git Hooks For Automation Commit
126- if : steps.check .outputs.has_updates == 'true' && (steps.check.outputs.effective_update_mode == 'patch-minor' || steps.check.outputs.effective_update_mode == 'all')
160+ if : steps.pending .outputs.has_changes == 'true' && (steps.check.outputs.effective_update_mode == 'patch-minor' || steps.check.outputs.effective_update_mode == 'all')
127161 run : git config core.hooksPath /dev/null
128162
129163 - name : Create Pull Request
130- if : steps.check .outputs.has_updates == 'true' && (steps.check.outputs.effective_update_mode == 'patch-minor' || steps.check.outputs.effective_update_mode == 'all')
164+ if : steps.pending .outputs.has_changes == 'true' && (steps.check.outputs.effective_update_mode == 'patch-minor' || steps.check.outputs.effective_update_mode == 'all')
131165 uses : peter-evans/create-pull-request@v6
132166 with :
133167 token : ${{ secrets.GITHUB_TOKEN }}
@@ -140,9 +174,10 @@ jobs:
140174
141175 - Mode: `${{ steps.check.outputs.effective_update_mode }}`
142176 - Downgrades detected in check report: `${{ steps.check.outputs.downgrade_count }}`
143- - Note: `patch-minor` mode only applies patch/minor changes; downgrades/major updates remain for manual review.
177+ - Note: Template versions, snapshots, and the dependency report were regenerated after applying updates.
178+ - Note: `all` mode includes major-version changes; the major dependency smoke test runs automatically when majors are detected.
144179
145- ${{ steps.check .outputs.report }}
180+ ${{ steps.final-report .outputs.report }}
146181
147182 ### Review Checklist
148183 - [ ] Review the version changes
@@ -170,13 +205,13 @@ jobs:
170205 echo "" >> $GITHUB_STEP_SUMMARY
171206 echo "### Report" >> $GITHUB_STEP_SUMMARY
172207 echo '```' >> $GITHUB_STEP_SUMMARY
173- echo "${{ steps.check .outputs.report }}" >> $GITHUB_STEP_SUMMARY
208+ echo "${{ steps.final-report .outputs.report }}" >> $GITHUB_STEP_SUMMARY
174209 echo '```' >> $GITHUB_STEP_SUMMARY
175210
176211 major-deps-smoke :
177212 name : Major Deps Smoke Test
178213 needs : check-versions
179- if : needs.check-versions.outputs.has_major_updates == 'true'
214+ if : needs.check-versions.outputs.has_major_updates == 'true' && needs.check-versions.outputs.has_pr_changes == 'true'
180215 runs-on : ubuntu-latest
181216 timeout-minutes : 45
182217 permissions :
@@ -229,7 +264,6 @@ jobs:
229264 --dev-check \
230265 --route-check \
231266 --output testing/.smoke-output
232- continue-on-error : true
233267
234268 - name : Post Step Summary
235269 if : always()
0 commit comments