Skip to content

[ci] Build exactly the pushed commit in push-triggered workflows - #23601

Merged
guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:gh14061-pin-push-builds
Oct 4, 2026
Merged

guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:gh14061-pin-push-builds

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

Push-triggered jobs passed only --base_ref to build_root.py, so they built whatever the branch pointed to when the job (re)started, which can be a later commit. That made post-merge builds unreliable as indicators of which commit broke a configuration.

build_root.py now accepts --sha for non-PR builds as well and, after the branch clone/pull, resets the checkout to exactly the commit that triggered the workflow (github.sha). If the commit is missing locally (e.g. the branch was force-pushed meanwhile), it is fetched explicitly from the repository.

The macOS step combines schedule and push: the sha is passed only for push events, so nightlies keep tracking the branch tip.

Fixes #14061

🤖 Done with the help of AI

Push-triggered jobs passed only --base_ref <branch> to build_root.py, so
they built whatever the branch pointed to when the job (re)started, which
can be a later commit. That made post-merge builds unreliable as
indicators of which commit broke a configuration.

build_root.py now accepts --sha for non-PR builds as well and, after the
branch clone/pull, resets the checkout to exactly the commit that
triggered the workflow (github.sha). If the commit is missing locally
(e.g. the branch was force-pushed meanwhile), it is fetched explicitly
from the repository.

The macOS step combines schedule and push: the sha is passed only for
push events, so nightlies keep tracking the branch tip.

Fixes root-project#14061

🤖 Done with the help of AI
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

Test Results

    24 files      24 suites   3d 22h 32m 1s ⏱️
 3 877 tests  3 876 ✅ 0 💤 1 ❌
83 916 runs  83 915 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 377beee.

@guitargeek
guitargeek merged commit 56f7ade into root-project:master Oct 4, 2026
39 of 42 checks passed
@guitargeek
guitargeek deleted the gh14061-pin-push-builds branch October 4, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub Actions don't build exactly the pushed commit

2 participants