ci(auto-merge): consume reusable workflow from renovate-config - #97
Conversation
Replaces the local 154-line auto-merge workflow with a 23-line thin caller that delegates to ANcpLua/renovate-config/.github/workflows/ auto-merge-reusable.yml@main. The reusable workflow uses a GitHub App installation token instead of GITHUB_TOKEN, fixing the cascade-block bug: native auto-merge under GITHUB_TOKEN identity silently drops the resulting push: main event, preventing downstream publish workflows from triggering. Required secrets in this repo: AUTOMERGE_APP_ID AUTOMERGE_APP_PRIVATE_KEY See https://github.com/ANcpLua/renovate-config#auto-merge-reusable-workflow Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe auto-merge workflow has been refactored to centralize logic. Five actor-specific jobs handling Dependabot, Renovate, AI-agent bots, CodeRabbit, and owner PRs have been consolidated into a single job that calls a reusable workflow from an external repository. Event triggers and permissions remain unchanged. Secrets are inherited to support the delegated workflow execution. This reduces code duplication and maintains the same functional scope with a net reduction of 130 lines. 🚥 Pre-merge checks | ✅ 9✅ Passed checks (9 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
@coderabbitai autofix |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
@coderabbitai autofix |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa865d850c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: gh pr merge --auto --squash "$PR_URL" | ||
| auto-merge: | ||
| uses: ANcpLua/renovate-config/.github/workflows/auto-merge-reusable.yml@main |
There was a problem hiding this comment.
Pin reusable workflow to immutable ref
Reference the reusable workflow by a commit SHA (or at least a version tag) instead of @main. With secrets: inherit and write permissions enabled, any future push to ANcpLua/renovate-config's main branch immediately changes privileged behavior in this repository without a local PR review, which can unexpectedly alter merge policy or expose inherited secrets like AUTOMERGE_APP_PRIVATE_KEY during pull_request_target runs.
Useful? React with 👍 / 👎.
Summary
Replaces the local auto-merge workflow with a thin caller delegating to the new reusable workflow at ANcpLua/renovate-config (PR #5 there).
Why
When the Owner / AI Agent / CodeRabbit tier calls
gh pr merge --autounderGITHUB_TOKENidentity, GitHub records the eventual native-auto-merge as performed bygithub-actions[bot]. Per GitHub docs, events triggered byGITHUB_TOKEN(other thanworkflow_dispatch/repository_dispatch) do NOT trigger new workflow runs — anti-loop protection. So the resultingpush: mainis silently dropped and downstream publish workflows never fire.Symptom seen on 2026-05-04: ANcpLua.NET.Sdk PR #99 merged at 20:22:30 UTC. The
push: mainevent for the merge commit produced ZERO workflow runs. SDK had to be manually dispatched viagh workflow runto ship v3.4.16.The fix uses a GitHub App installation token. The App becomes the merge actor; events fire normally.
Required setup
This PR is draft until two repo secrets exist:
AUTOMERGE_APP_ID— the numeric App IDAUTOMERGE_APP_PRIVATE_KEY— full PEM contents of the App's private keySetup is a one-time 5-min manual step:
Once the secrets are in place this PR can be marked ready and merged.
Test plan
Summary by CodeRabbit