Skip to content

Commit 2057fa5

Browse files
committed
Add the NPM token to the workflows.
1 parent f863fe2 commit 2057fa5

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,14 @@ jobs:
3030
- name: Setup Node.js
3131
uses: actions/setup-node@v5
3232
with:
33-
node-version: ${{ env.NODE_VERSION }}
3433
cache: 'npm'
34+
node-version: ${{ env.NODE_VERSION }}
35+
registry-url: 'https://npm.pkg.github.com'
3536

3637
- name: Install dependencies
3738
run: npm ci --prefer-offline --no-audit
39+
env:
40+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3841

3942
- name: Run ESLint
4043
run: npm run lint

.github/workflows/copilot-setup-steps.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
uses: actions/setup-node@v5
4343
with:
4444
node-version: ${{env.NODE_VERSION}}
45+
registry-url: 'https://npm.pkg.github.com'
4546

4647
- name: Cache npm files
4748
uses: actions/cache@v4
@@ -59,6 +60,8 @@ jobs:
5960
# Let that happen in other jobs, this job needs to be fast
6061
- name: npm ci
6162
run: npm ci --ignore-scripts --prefer-offline --no-audit
63+
env:
64+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6265

6366
- name: npm run postinstall
6467
run: npm run postinstall

.github/workflows/deps.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ jobs:
2828
- name: Setup Node.js
2929
uses: actions/setup-node@v5
3030
with:
31-
node-version: ${{ env.NODE_VERSION }}
3231
cache: 'npm'
32+
node-version: ${{ env.NODE_VERSION }}
33+
registry-url: 'https://npm.pkg.github.com'
3334

3435
- name: Install dependencies
3536
run: npm ci --prefer-offline --no-audit
37+
env:
38+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3639

3740
- name: Run security audit
3841
run: npm audit --json > audit-report.json || true

0 commit comments

Comments
 (0)