Skip to content

need to sign commits#140

Merged
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:need-to-sign-commits
Apr 20, 2026
Merged

need to sign commits#140
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:need-to-sign-commits

Conversation

@derekmisler
Copy link
Copy Markdown
Contributor

@derekmisler derekmisler commented Apr 20, 2026

Related Issues

Closes: https://github.com/docker/gordon/issues/403

Summary

Replaces all git commit + git push calls with the GraphQL createCommitOnBranch mutation so every CI-generated commit is cryptographically signed by GitHub's web-flow GPG key. This prepares the repo for the org-wide mandatory commit signing rollout (May 4 target).

What changed

New: src/signed-commit.ts + src/signed-commit-cli.ts
Core TypeScript module and CLI wrapper that create signed commits via the GraphQL createCommitOnBranch mutation. Accepts file paths via --add flags or piped through --add-stdin. Supports --force for create-or-update branch semantics and --delete for file removals. 14 unit tests in src/__tests__/signed-commit.test.ts.

release.yml — 3 commit points converted

  • Release commit + tag (Pass 1 & 2): Replaced git commit-tree + git tag + git push with two createCommitOnBranch calls on a staging branch, then API-based tag creation and staging branch cleanup.
  • Self-ref update (update-self-refs job): Replaced git checkout -B + git commit + git push --force with the CLI. Added pnpm/Node.js setup since this job didn't previously need a build step. File list passed between steps via /tmp/updated-files.txt.
  • Consumer repo updates (update-consumers job): Replaced git commit -s + git push --force with the CLI inside the existing loop. Added graceful error handling (|| { warning + continue }) for repos without write access.
  • Removed dead Configure git step (no more git push).
  • Added --head to all gh pr create calls (local HEAD stays on main with API commits).

update-docker-agent-version.yml — 1 commit point converted
Replaced git checkout -B + git commit + git push --force with the CLI. Added pnpm/Node.js setup steps.

rollup.config.mjs
Refactored to multi-target build: setup-credentials + signed-commit-cli.

Housekeeping

  • Added **/dist/ to .gitignore and biome.json excludes.
  • Deleted scripts/update-consumers.sh (dead code — the release workflow has its own inline implementation).

Tip

Comment /review to trigger the PR Reviewer agent for automated feedback.
Comment /describe to generate a PR description.

@derekmisler derekmisler self-assigned this Apr 20, 2026
@derekmisler derekmisler requested a review from a team April 20, 2026 13:50
@derekmisler derekmisler marked this pull request as ready for review April 20, 2026 13:50
Copy link
Copy Markdown
Contributor

@docker-agent docker-agent Bot left a comment

Choose a reason for hiding this comment

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

Assessment: 🟡 NEEDS ATTENTION

Two medium-severity issues found in the new signed-commit infrastructure. Verification was attempted but returned inconclusive; findings are surfaced from the drafter for author evaluation.

Comment thread .github/workflows/release.yml
Comment thread src/signed-commit-cli.ts Outdated
@derekmisler derekmisler force-pushed the need-to-sign-commits branch from 3318bee to 8e80d73 Compare April 20, 2026 19:40
Signed-off-by: Derek Misler <derek.misler@docker.com>
@derekmisler derekmisler force-pushed the need-to-sign-commits branch from 8e80d73 to e142517 Compare April 20, 2026 19:43
@derekmisler derekmisler enabled auto-merge (squash) April 20, 2026 19:43
@derekmisler derekmisler merged commit 7678596 into docker:main Apr 20, 2026
11 checks passed
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.

2 participants