@@ -111,8 +111,11 @@ jobs:
111111 workflow_dispatch)
112112 if [ -n "$DISPATCH_PR" ]; then
113113 PR_NUMBER="$DISPATCH_PR"
114- HEAD_REF=$(gh pr view "$PR_NUMBER" --json headRefName --jq .headRefName)
115- AUTHOR=$(gh pr view "$PR_NUMBER" --json author --jq '.author.login')
114+ # --repo is required because this step runs before the
115+ # actions/checkout below — gh otherwise looks for a
116+ # local .git context and fails with "not a git repository".
117+ HEAD_REF=$(gh pr view "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --json headRefName --jq .headRefName)
118+ AUTHOR=$(gh pr view "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --json author --jq '.author.login')
116119 case "$AUTHOR" in
117120 app/renovate|renovate[bot]|app/github-actions|github-actions[bot])
118121 ;;
@@ -235,9 +238,10 @@ jobs:
235238 BASE="$BASE_FROM_EVENT"
236239 else
237240 # workflow_dispatch retry: look up the PR's base_ref.
241+ # --repo because in retry mode there's no prior checkout.
238242 NUMBER="$PR_FROM_RESOLVE"
239243 HEAD="$HEAD_FROM_RESOLVE"
240- BASE=$(gh pr view "$NUMBER" --json baseRefName --jq .baseRefName)
244+ BASE=$(gh pr view "$NUMBER" --repo "$GITHUB_REPOSITORY" -- json baseRefName --jq .baseRefName)
241245 fi
242246 {
243247 echo "number=$NUMBER"
@@ -344,21 +348,26 @@ jobs:
344348 node scripts/bundle-upstream-schema.mjs
345349 rm -rf "$TMP"
346350
347- # Commit the refreshed reference assets (synced release-asset
348- # files + regenerated toolhive CRD MDX if applicable) before the
349- # skill runs. This keeps the skill's content commit clean and
351+ # Commit AND PUSH the refreshed reference assets (synced release-
352+ # asset files + regenerated toolhive CRD MDX if applicable) before
353+ # the skill runs. Pushing here — rather than batching the push
354+ # with the skill-content commit later — means refresh work is
355+ # preserved on the PR even if the skill step fails or is
356+ # cancelled. Also keeps the skill's content commit clean and
350357 # lets the autogen-detect step below distinguish skill touches
351358 # from our own legitimate refresh writes.
352- - name : Commit refreshed reference assets
359+ - name : Commit + push refreshed reference assets
353360 env :
354361 PROJECT_ID : ${{ steps.detect.outputs.id }}
355362 NEW_TAG : ${{ steps.detect.outputs.new_tag }}
363+ HEAD_REF : ${{ steps.eff.outputs.head_ref }}
356364 run : |
357365 git add -A
358366 if git diff --cached --quiet; then
359367 echo "No reference changes for $PROJECT_ID $NEW_TAG."
360368 else
361369 git commit -m "Refresh reference assets for $PROJECT_ID $NEW_TAG"
370+ git push origin "HEAD:$HEAD_REF"
362371 fi
363372
364373 - name : Extract reviewers from release compare
@@ -428,11 +437,15 @@ jobs:
428437 allowed_bots : ' renovate'
429438 # Real-time visibility into skill progress during long runs.
430439 # track_progress posts a sticky tracking comment on the PR
431- # that updates as the skill works through each phase.
440+ # that updates as the skill works through each phase —
441+ # BUT it's only supported for pull_request / issue_comment
442+ # /* events. Setting it on workflow_dispatch fails the
443+ # action with "track_progress is only supported for events
444+ # ... Current event: workflow_dispatch", so gate it on the
445+ # triggering event.
432446 # display_report surfaces the Claude Code Report in the
433- # Actions Step Summary so operators watching the run see
434- # progress without waiting for gh run view --log.
435- track_progress : true
447+ # Actions Step Summary regardless of trigger.
448+ track_progress : ${{ github.event_name == 'pull_request' }}
436449 display_report : true
437450 prompt : |
438451 You are running in GitHub Actions with no interactive user. Follow
0 commit comments