-
Notifications
You must be signed in to change notification settings - Fork 31
Fix workflow #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix workflow #69
Changes from all commits
d0fda5e
7860350
4e9c13e
3095a30
468e67d
2fac9dd
d1f1d6d
dcc5a18
1d1c863
c4197fc
8fdc6b8
2ddb1ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -57,15 +57,35 @@ jobs: | |||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||
node-version: ${{ matrix.node }} | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
- name: Set up npm authentication | ||||||||||||||||||||||||||||||
shell: bash | ||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||
echo "//localhost:4873/:_auth=$(echo -n 'dummy:dummy' | base64)" >> ~/.npmrc | ||||||||||||||||||||||||||||||
echo "email=dummy@gmail.com" >> ~/.npmrc | ||||||||||||||||||||||||||||||
echo "always-auth=true" >> ~/.npmrc | ||||||||||||||||||||||||||||||
npx verdaccio@5.32.2 & | ||||||||||||||||||||||||||||||
for i in {1..30}; do | ||||||||||||||||||||||||||||||
if curl -sf http://localhost:4873/-/ping > /dev/null; then break; fi | ||||||||||||||||||||||||||||||
echo "Waiting for Verdaccio to be ready..."; sleep 2; | ||||||||||||||||||||||||||||||
done | ||||||||||||||||||||||||||||||
Comment on lines
+66
to
+70
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Running Verdaccio in the background without capturing its process ID makes it difficult to manage or terminate if needed. Consider storing the PID or using a more robust process management approach.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||||||||||||||||
npm config set registry http://localhost:4873 | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
- name: Register user with Verdaccio | ||||||||||||||||||||||||||||||
shell: bash | ||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||
curl -X PUT http://localhost:4873/-/user/org.couchdb.user:dummy \ | ||||||||||||||||||||||||||||||
-H "Content-Type: application/json" \ | ||||||||||||||||||||||||||||||
-d '{ | ||||||||||||||||||||||||||||||
"name": "dummy", | ||||||||||||||||||||||||||||||
"password": "dummy", | ||||||||||||||||||||||||||||||
"email": "dummy@gmail.com" | ||||||||||||||||||||||||||||||
}' | ||||||||||||||||||||||||||||||
Comment on lines
+76
to
+82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The curl command for user registration lacks error handling. Consider adding '--fail' flag or checking the exit code to ensure the user registration succeeds before proceeding.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
- name: Setup staging npm package | ||||||||||||||||||||||||||||||
if: ${{ github.event.inputs.package_url != '' }} | ||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||
echo 'Publishing tar.gz to local registry' | ||||||||||||||||||||||||||||||
curl -o staging_package.tgz "$PACKAGE_URL" | ||||||||||||||||||||||||||||||
npm install verdaccio@5.32.2 -g | ||||||||||||||||||||||||||||||
verdaccio & | ||||||||||||||||||||||||||||||
npm config set registry http://localhost:4873 | ||||||||||||||||||||||||||||||
npm install -g npm-cli-adduser && npm-cli-adduser -u dummy -p dummy -e dummy@gmail.com -r http://localhost:4873 | ||||||||||||||||||||||||||||||
npm publish staging_package.tgz --registry http://localhost:4873/ | ||||||||||||||||||||||||||||||
shell: bash | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
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.
Hard-coded credentials ('dummy:dummy') are being used for authentication. While this appears to be for testing purposes, consider using environment variables or GitHub secrets to avoid exposing credentials in the workflow file.
Copilot uses AI. Check for mistakes.