Compare commits

...

3 Commits

Author SHA1 Message Date
Oleksandr Bordun 6d5252c0b8 Merge pull request #10 from ardeois/master
fix .npmrc file generation
2019-10-15 20:43:14 +02:00
Corentin Ardeois e0c8d84b6e fix .npmrc file generation
When we pass an `auth-token`, a `.npmrc` file is generated but it's value could be invalid
The parameter substitution to set a default value on `NPM_` was not working.

Github action defines the `NPM_*` environment variables with a null value, but we were setting a default value only if the environment variable was not set at all.
2019-10-15 14:38:37 -04:00
Borales 4e4261c59f Fixing typo 2019-10-14 11:36:20 +02:00
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- uses: borales/actions-yarn@2.0.0 - uses: borales/actions-yarn@v2.0.0
with: with:
cmd: install cmd: install
``` ```
@@ -38,7 +38,7 @@ jobs:
To authenticate with, and publish to, a registry other than `registry.npmjs.org`: To authenticate with, and publish to, a registry other than `registry.npmjs.org`:
```yml ```yml
- uses: borales/actions-yarn@2.0.0 - uses: borales/actions-yarn@v2.0.0
with: with:
auth-token: ${{ secrets.NPM_TOKEN }} auth-token: ${{ secrets.NPM_TOKEN }}
registry-url: someOtherRegistry.someDomain.net registry-url: someOtherRegistry.someDomain.net
+3 -3
View File
@@ -4,9 +4,9 @@ set -e
if [ -n "$NPM_AUTH_TOKEN" ]; then if [ -n "$NPM_AUTH_TOKEN" ]; then
# Respect NPM_CONFIG_USERCONFIG if it is provided, default to $HOME/.npmrc # Respect NPM_CONFIG_USERCONFIG if it is provided, default to $HOME/.npmrc
NPM_CONFIG_USERCONFIG="${NPM_CONFIG_USERCONFIG-"$HOME/.npmrc"}" NPM_CONFIG_USERCONFIG="${NPM_CONFIG_USERCONFIG:-"$HOME/.npmrc"}"
NPM_REGISTRY_URL="${NPM_REGISTRY_URL-registry.npmjs.org}" NPM_REGISTRY_URL="${NPM_REGISTRY_URL:-registry.npmjs.org}"
NPM_STRICT_SSL="${NPM_STRICT_SSL-true}" NPM_STRICT_SSL="${NPM_STRICT_SSL:-true}"
NPM_REGISTRY_SCHEME="https" NPM_REGISTRY_SCHEME="https"
if ! $NPM_STRICT_SSL if ! $NPM_STRICT_SSL
then then