Skip to content

Commit

Permalink
set token
Browse files Browse the repository at this point in the history
hey

hey
  • Loading branch information
HuiSF committed Jul 24, 2024
1 parent 6a9ea4c commit 28c4965
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/actions/load-verdaccio-with-amplify-js/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,29 @@ runs:
- name: Install and run npm-cli-login
shell: bash
env:
NPM_REGISTRY: http://localhost:4873/
NPM_REGISTRY_HOST: localhost:4873
NPM_REGISTRY: http://localhost:4873
NPM_USER: verdaccio
NPM_PASS: verdaccio
NPM_EMAIL: [email protected]
run: |
curl -s \
TOKEN=$(curl -s \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-X PUT --data "{\"name\": \"$NPM_USER\", \"password\": \"$NPM_PASS\", \"email\": \"$NPM_EMAIL\"}" \
$NPM_REGISTRY-/user/org.couchdb.user:$NPM_USER \
&& curl -s \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-X PUT --data "{\"name\": \"$NPM_USER\", \"password\": \"$NPM_PASS\", \"email\": \"$NPM_EMAIL\"}" \
--user $NPM_USER:$NPM_PASS $NPM_REGISTRY-/user/org.couchdb.user:$NPM_USER
$NPM_REGISTRY-/user/org.couchdb.user:$NPM_USER 2>&1 | jq -r '.token')
yarn config set registry $NPM_REGISTRY
npm set registry $NPM_REGISTRY
npm set //"$NPM_REGISTRY_HOST"/:_authToken $TOKEN
- name: Configure registry and git
shell: bash
working-directory: ./amplify-js
env:
NPM_REGISTRY: http://localhost:4873/
NPM_REGISTRY: http://localhost:4873
NPM_USER: verdaccio
NPM_PASS: verdaccio
NPM_EMAIL: [email protected]
run: |
yarn config set registry $NPM_REGISTRY
npm set registry $NPM_REGISTRY
git config --global user.email $NPM_EMAIL
git config --global user.name $NPM_USER
git status
Expand Down

0 comments on commit 28c4965

Please sign in to comment.