Skip to content

Commit 63007bf

Browse files
authored
chore: protect NPM token during pipeline install
Protect NPM Token During Pipeline Install
2 parents fe82bf1 + b0790d8 commit 63007bf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ jobs:
3939
${{ runner.os }}-yarn-
4040
4141
- name: Install Packages
42-
run: yarn install --frozen-lockfile --prefer-offline
42+
# NOTE: The --ignore-scripts flag is required to prevent leakage of NPM_TOKEN value
43+
# See https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#use-private-packages
44+
run: yarn install --frozen-lockfile --prefer-offline --ignore-scripts
4345

4446
- name: Build
4547
run: yarn prepack
@@ -52,7 +54,6 @@ jobs:
5254
env:
5355
NODE_ENV: "cicd"
5456
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
55-
NPM_TOKEN: ${{secrets.npm_token}}
5657
GITHUB_TOKEN: ${{secrets.gh_token}}
5758
GIT_AUTHOR_NAME: "autocloud-deploy-bot"
5859
GIT_AUTHOR_EMAIL: "no-reply@autocloud.dev"

0 commit comments

Comments
 (0)