Skip to content

fix update consumers workflow#158

Merged
derekmisler merged 1 commit into
docker:mainfrom
derekmisler:fix-update-consumers-workflow
Apr 29, 2026
Merged

fix update consumers workflow#158
derekmisler merged 1 commit into
docker:mainfrom
derekmisler:fix-update-consumers-workflow

Conversation

@derekmisler
Copy link
Copy Markdown
Contributor

@derekmisler derekmisler commented Apr 29, 2026

Related Issues

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

Summary

Add build steps to the update-consumers workflow to ensure the signed-commit CLI is built before discovering and updating consumer repositories. This ensures the latest version of the action is available when notifying consumers.

Changes

  • Add checkout of cagent-action source at the current workflow SHA
  • Setup pnpm and Node.js 24 with caching
  • Build the signed-commit CLI before running consumer discovery and updates

Signed-off-by: Derek Misler <derek.misler@docker.com>
@derekmisler derekmisler self-assigned this Apr 29, 2026
@derekmisler derekmisler requested a review from a team April 29, 2026 13:42
@derekmisler derekmisler marked this pull request as ready for review April 29, 2026 13:42
@derekmisler derekmisler enabled auto-merge (squash) April 29, 2026 13:42
@derekmisler derekmisler merged commit f9d71fe into docker:main Apr 29, 2026
19 checks passed
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

uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: docker/cagent-action
ref: ${{ github.workflow_sha }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[MEDIUM] Checkout for build uses github.workflow_sha instead of the release SHA, potentially building the CLI from the wrong ref

The new "Checkout source for build" step uses ref: ${{ github.workflow_sha }} — the SHA of the commit that contains the workflow file (typically the current HEAD of main). However, the workflow's purpose is to propagate a specific validated release SHA (steps.resolve.outputs.sha) to consumer repositories.

This creates a semantic mismatch: the dist/signed-commit.js CLI that's built and then used in the "Discover and update consumer repos" step to create signed commits in consumer repos is compiled from a different commit than the release being propagated. If main has moved ahead of the release (which is the common case), consumers will be updated to release SHA X, but the CLI binary that performs those updates was built from a newer, unreleased commit.

Consider whether the intent is:

  • Build from the release SHA (consistent, reproducible): use ref: ${{ steps.resolve.outputs.sha }}
  • Build from the latest workflow infra (always up-to-date tooling): the current github.workflow_sha is intentional, but this should be documented with a comment explaining the design choice, since it means the CLI used to update consumers is not the same version being released to them.
      - name: Checkout source for build
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          repository: docker/cagent-action
          ref: ${{ github.workflow_sha }}  # <-- builds from main HEAD, not the release SHA

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