Skip to content

Commit bb09dda

Browse files
committed
fix token usage
1 parent a5480c7 commit bb09dda

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/actions/yarn/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
name: 'Restore Yarn Cache'
22
description: 'Setup a NodeJS environment and restore cache if any, given a node version'
33

4+
inputs:
5+
token:
6+
description: 'NPM Token'
7+
required: false
8+
49
runs:
510
using: 'composite'
611
steps:
712
- name: Setup Node.js
813
uses: actions/setup-node@v3
914
env:
10-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
15+
NODE_AUTH_TOKEN: ${{ inputs.token }}
1116
with:
1217
node-version-file: .nvmrc
1318
registry-url: https://registry.npmjs.org/

.github/workflows/publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
git config --global push.default current
3737
3838
- uses: ./.github/actions/yarn
39+
with:
40+
token: ${{ secrets.NPM_TOKEN }}
3941

4042
- run: yarn turbo run build --concurrency=3
4143

@@ -51,6 +53,8 @@ jobs:
5153
steps:
5254
- uses: actions/checkout@v3
5355
- uses: ./.github/actions/yarn
56+
with:
57+
token: ${{ secrets.NPM_TOKEN }}
5458
- run: npx auto pr-check --url "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}?pr=${{github.event.pull_request.number}}"
5559
env:
5660
GH_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN || github.token }}

0 commit comments

Comments
 (0)