Skip to content

fix: build dist/ before setup-credentials in self-review-pr.yml#191

Merged
derekmisler merged 1 commit into
docker:mainfrom
docker-agent:fix/self-review-dist-build
May 7, 2026
Merged

fix: build dist/ before setup-credentials in self-review-pr.yml#191
derekmisler merged 1 commit into
docker:mainfrom
docker-agent:fix/self-review-dist-build

Conversation

@docker-agent
Copy link
Copy Markdown
Contributor

Problem

self-review-pr.yml was failing with:

Error: Cannot find module '/home/runner/work/cagent-action/cagent-action/dist/credentials.js'

The .github/actions/setup-credentials action runs:

node "$GITHUB_ACTION_PATH/../../../dist/credentials.js"

But dist/ is in .gitignore and never committed to the repo. So when a workflow checks out the repo and immediately calls ./.github/actions/setup-credentials, the dist/ files don't exist.

Root cause

release.yml works correctly because it runs pnpm install && pnpm build in the same job before calling setup-credentials. self-review-pr.yml had no such build step.

Fix

Add pnpm/action-setup + actions/setup-node + pnpm install --frozen-lockfile && pnpm build steps immediately after the initial actions/checkout step in each of the four affected jobs:

  • resolve-context
  • review
  • reply-to-feedback
  • reply-to-mention

The pinned action SHAs (pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d and actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e) match the versions already used in release.yml.

Validation

  • biome ci . — passes ✓
  • tsc --noEmit — passes ✓
  • actionlint — only pre-existing node24 runner warnings (present on main before this PR) ✓

dist/ is excluded from .gitignore and not committed to the repo.
The setup-credentials action runs `node dist/credentials.js` but that
file only exists after `pnpm install && pnpm build` is run.

release.yml already does this correctly (build then setup-credentials).
self-review-pr.yml did not have a build step, causing all three jobs
that call setup-credentials to fail with:
  Cannot find module '.../dist/credentials.js'

Add pnpm/action-setup + setup-node + pnpm build steps immediately
after the initial checkout in each of the four affected jobs:
- resolve-context
- review
- reply-to-feedback
- reply-to-mention

Pinned action SHAs match the versions already used in release.yml.
@docker-agent docker-agent requested a review from a team as a code owner May 7, 2026 15:21
@docker-agent docker-agent requested a review from derekmisler May 7, 2026 15:21
@derekmisler derekmisler merged commit b039161 into docker:main May 7, 2026
9 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