Skip to content

Commit 8777819

Browse files
fix: use bunx for npm publish in Dagger pipeline
The oven/bun container doesn't include npm, causing the publish step to fail with "npm: not found". Use bunx to run npm publish instead. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent c7dcc73 commit 8777819

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.dagger/src/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export class AstroOpengraphImages {
131131
const container = this.installDependencies(source)
132132
.withExec(["bun", "run", "build"])
133133
.withSecretVariable("NPM_TOKEN", npmToken)
134-
.withExec(["sh", "-c", 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc && npm publish']);
134+
.withExec(["sh", "-c", 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc && bunx npm publish']);
135135

136136
return container.stdout();
137137
});
@@ -195,7 +195,11 @@ export class AstroOpengraphImages {
195195
const container = this.installDependencies(source)
196196
.withExec(["bun", "run", "build"])
197197
.withSecretVariable("NPM_TOKEN", npmToken)
198-
.withExec(["sh", "-c", 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc && npm publish']);
198+
.withExec([
199+
"sh",
200+
"-c",
201+
'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc && bunx npm publish',
202+
]);
199203
return container.stdout();
200204
});
201205
return `${ciResult}\nRelease PR: ${releasePrResult}\nGitHub Release: ${githubReleaseResult}\nPackage published to npm`;

0 commit comments

Comments
 (0)