Skip to content

ci: add advisory Docker build status check for pull requests#200

Draft
svvarom wants to merge 4 commits into
mainfrom
docker-build-pr-check/smuley
Draft

ci: add advisory Docker build status check for pull requests#200
svvarom wants to merge 4 commits into
mainfrom
docker-build-pr-check/smuley

Conversation

@svvarom
Copy link
Copy Markdown
Contributor

@svvarom svvarom commented Jun 5, 2026

What

Adds a docker-build commit status to pull requests, so a change that breaks the container image build is caught pre-merge. Advisory for now (non-blocking); can become a required check later via branch protection, with no code change.

Why

Build breakage currently surfaces only after merge; this puts the signal on the PR instead.

What's added (.github/workflows/)

  • docker-build-trigger.yml — on pull_request; starts the flow.
  • docker-build-dispatch.yml — sets the docker-build commit status (pending) and triggers the image build; the result is posted back onto the status.
  • docker-build-liveness.yml — scheduled; fails statuses left pending past a timeout.

How the status is written

A commit status (not a check run), so it can be written with the workflow's built-in GITHUB_TOKEN rather than a GitHub App. This side posts the initial pending; the builder posts the final success / failure.

Scope

  • Advisory only (not in branch protection).
  • The builder side lands in a companion PR.

Setup before merge

Dispatch secrets are already present; the builder PR needs a token to post the status result. No GitHub App required.

Surface a `docker-build` check on each PR so build breakage is caught
pre-merge: a pull_request trigger, a dispatch workflow that posts the check
and triggers the build, and a scheduled liveness job that fails stale
checks. Advisory only; not wired into branch protection.

Signed-off-by: Swarom Muley <smuley@nvidia.com>
@svvarom svvarom self-assigned this Jun 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Suite Lines Covered Line Rate Branch Rate
Unit Tests 18715/24765 75.6% 62.0%
Integration Tests 11995/23529 51.0% 26.2%

uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
env:
QUEUED_TIMEOUT_MIN: ${{ vars.DOCKER_BUILD_QUEUED_TIMEOUT_MIN || '20' }}
INPROGRESS_TIMEOUT_MIN: ${{ vars.DOCKER_BUILD_INPROGRESS_TIMEOUT_MIN || '60' }}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bump this to 90

svvarom added 3 commits June 4, 2026 21:56
The dispatch and liveness workflows now set output.title to the current
state (Waiting to build / Image built / Build failed / Build timed out)
so the PR check row shows status at a glance. The check name stays
"docker-build" for branch protection.

Signed-off-by: Swarom Muley <smuley@nvidia.com>
… run

Check runs can only be created by a GitHub App; a commit status can be written with the workflow's GITHUB_TOKEN, which fits our CI setup. The dispatch workflow now posts a docker-build commit status (pending) on the PR head SHA, and the liveness cron reaps stale pending statuses on a single timeout. Drops the App-token minting and the check_run_id plumbing.

Signed-off-by: Swarom Muley <smuley@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant