Skip to content

Commit dfcfcbd

Browse files
kin0992claude
andcommitted
Track NPM_TOKEN Actions secret in Pulumi
Declare the NPM_TOKEN repository secret consumed by the release workflow. Value is supplied out-of-band via stack config: pulumi config set --secret devToolkit:npmToken <token> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent cad19c6 commit dfcfcbd

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

infra/Pulumi.prod.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ config:
22
devToolkit:repoName: dev-toolkit
33
devToolkit:defaultBranch: main
44
github:owner: kin0992
5+
devToolkit:npmToken:
6+
secure: AAABAJBpCXqVz2KYKQtgTPB4oEUkgDOLc1AhEHGhogxUi8vnCc6VjyIyIR0ilZhWdozxWL2eByCJ+w8dW9o/YyJ8o2j/XADZ

infra/index.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import * as github from '@pulumi/github';
33

44
const cfg = new pulumi.Config('devToolkit');
55
const repoName = cfg.get('repoName') ?? 'dev-toolkit';
6+
// npmjs.org Automation token consumed by the release workflow to publish
7+
// @kin0992/* packages with provenance.
8+
const npmToken = cfg.requireSecret('npmToken');
69

710
export const repo = new github.Repository('dev-toolkit', {
811
name: repoName,
@@ -22,8 +25,6 @@ export const repo = new github.Repository('dev-toolkit', {
2225
squashMergeCommitMessage: 'PR_BODY',
2326
vulnerabilityAlerts: true,
2427
allowUpdateBranch: true,
25-
mergeCommitTitle: 'PR_TITLE',
26-
mergeCommitMessage: 'PR_BODY',
2728
topics: [
2829
'platform-engineering',
2930
'github-actions',
@@ -78,6 +79,12 @@ new github.RepositoryDependabotSecurityUpdates('dependabot-updates', {
7879
enabled: true,
7980
});
8081

82+
new github.ActionsSecret('npm-token', {
83+
repository: repo.name,
84+
secretName: 'NPM_TOKEN',
85+
value: npmToken,
86+
});
87+
8188
// TODO: Move Private Vulnerability Reporting under Pulumi when
8289
// @pulumi/github exposes the resource (upstream Terraform gap).
8390
// Enabled out-of-band: PUT /repos/{owner}/{repo}/private-vulnerability-reporting.

0 commit comments

Comments
 (0)