This repository has been archived by the owner on Apr 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Use NODE_AUTH_TOKEN instead of old unmaintained npm-cli-login #36
Draft
sethidden
wants to merge
1
commit into
main
Choose a base branch
from
remove-npm-cli-login
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,13 +35,7 @@ jobs: | |
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.node-version' | ||
|
||
- name: Log into Verdaccio | ||
if: ${{ inputs.enterprise }} | ||
shell: bash | ||
run: | | ||
npm install -g npm-cli-login | ||
npm-cli-login -u "${{ secrets.NPM_USER }}" -p "${{ secrets.NPM_PASS }}" -e [email protected] -r https://registrynpm.storefrontcloud.io | ||
registry-url: 'https://registrynpm.storefrontcloud.io' | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,9 @@ on: | |
required: false | ||
default: "['16', '18']" | ||
|
||
env: | ||
HUSKY: 0 | ||
|
||
jobs: | ||
scanning: | ||
name: GitGuardian scan | ||
|
@@ -64,13 +67,15 @@ jobs: | |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | ||
to_envs() { jq -r "to_entries[] | \"\(.key)<<$EOF\n\(.value)\n$EOF\n\""; } | ||
echo "$SECRETS_CONTEXT" | to_envs >> $GITHUB_ENV | ||
|
||
- name: Checkout code 🛎️ | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup node 🏗️ | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
registry-url: 'https://registrynpm.storefrontcloud.io' | ||
|
||
- name: Get cache 🗄️ | ||
id: cache | ||
|
@@ -79,17 +84,11 @@ jobs: | |
path: '**/node_modules' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Log into Verdaccio | ||
if: ${{ inputs.enterprise }} | ||
shell: bash | ||
run: | | ||
npm install -g npm-cli-login | ||
npm-cli-login -u "${{ secrets.NPM_USER }}" -p "${{ secrets.NPM_PASS }}" -e [email protected] -r https://registrynpm.storefrontcloud.io | ||
|
||
- name: Install dependencies (OS) | ||
if: ${{ !steps.cache.outputs.cache-hit }} | ||
shell: bash | ||
run: HUSKY=0 yarn --frozen-lockfile | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Detect circular dependencies 🔄 | ||
uses: vuestorefront/engineering-toolkit/github-actions/circular-dependencies@main | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only problem here is that this needs a NODE_AUTH_TOKEN env var present like:
I don't want to base64 the secrets because that way GitHub actions won't protect them against being leaked. It'd be much better to have a convention where you need to pass NODE_AUTH_TOKEN as a secret to this workflow.
The problem is that now we have a convention of having NPM_PASS and NPM_USER separately, so I'd need to write some compat input to the action that selectively uses one or the other.
Or just make a new branch for the newer CI