ci: prevent regenerate-models from opening duplicate empty PRs (#895)
The `Regenerate models` workflow opened a new (and mostly empty) PR on
every dispatch from a single apify-docs PR. For example, docs PR #2689
produced 7 client PRs (#888 to #894).
Root cause: the "Point branch at current master" step force-pushed the
shared `update-models-docs-pr-<N>` branch to master before committing.
That intermediate "branch == master" state made the open PR's head
identical to its base, which GitHub auto-closes. The next dispatch's `gh
pr list --head` (open PRs only) then found nothing and created a
brand-new PR, leaving the auto-closed one looking empty.
Fix: drop the force-push-to-master step and append the regenerated
models to the auto-update branch as signed ("Verified") commits via
`apify/actions/signed-commit`. A fresh docs PR creates the branch and
its first commit; each later commit on the docs PR appends another
commit, so the client PR mirrors the docs PR and stays open throughout.
Repeated dispatches that regenerate identical models add no commit
(`committed=false`), and the docs-PR comment fires only when a PR is
created or a commit is appended. V
Vlada Dusek committed
9c266f25bfa91f5d4dbc7a63949a004e7f808046
Parent: 86f0e0b
Committed by GitHub <noreply@github.com>
on 6/25/2026, 9:02:52 AM