From 31a8d5c5b515bac56967cb1c27b09fac02ddd48c Mon Sep 17 00:00:00 2001 From: Leandro Costa Date: Fri, 27 Jun 2025 13:01:42 -0300 Subject: [PATCH] ci: using inputs.git_username --- .forgejo/actions/publish-npm-package/action.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.forgejo/actions/publish-npm-package/action.yaml b/.forgejo/actions/publish-npm-package/action.yaml index df3133b..e5b0f17 100644 --- a/.forgejo/actions/publish-npm-package/action.yaml +++ b/.forgejo/actions/publish-npm-package/action.yaml @@ -60,7 +60,7 @@ runs: shell: sh run: | cd dist - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc + echo "//registry.npmjs.org/:_authToken=${{ inputs.npm_token }}" > ~/.npmrc if npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" > /dev/null 2>&1; then echo "Package ${PACKAGE_NAME}@${PACKAGE_VERSION} already exists. Skipping publish." @@ -70,14 +70,13 @@ runs: fi cd .. - env: - NPM_TOKEN: ${{ secrets.npm_token }} - name: Publish to Git Packages shell: sh run: | - npm config set registry https://git.lhprovedor.com.br/api/packages/$GIT_USERNAME/npm/ - npm config set -- '//git.lhprovedor.com.br/api/packages/$GIT_USERNAME/npm/:_authToken' "${GIT_TOKEN}" + echo "Git Username: ${{ inputs.git_username }}" + npm config set registry https://git.lhprovedor.com.br/api/packages/${{ inputs.git_username }}/npm/ + npm config set -- '//git.lhprovedor.com.br/api/packages/${{ inputs.git_username }}/npm/:_authToken' "${{ inputs.git_token }}" cd dist if npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" > /dev/null 2>&1; then @@ -88,6 +87,3 @@ runs: fi cd .. - env: - GIT_TOKEN: ${{ inputs.git_token }} - GIT_USERNAME: ${{ inputs.git_username }}