diff --git a/.circleci/config.yml b/.circleci/config.yml index 5a5065cfa..61f22019c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -251,8 +251,11 @@ jobs: if [[ ! -e version.txt ]]; then exit 0 else - # Remove npm config - rm -f ./.npmrc + # Restore the committed .npmrc (pnpm workspace config such as + # node-linker=hoisted). NPM_PUBLISH overwrote it with a publish + # auth token, but the Dockerfile COPYs .npmrc for the in-image + # pnpm install, so it needs the config file present and token-free. + git checkout -- .npmrc # Set our version number using vars export IMAGE_VERSION=$(cat version.txt) export IMAGE_VERSION_FULL=v$IMAGE_VERSION @@ -285,8 +288,11 @@ jobs: if [[ ! -e version.txt ]]; then exit 0 else - # Remove npm config - rm -f ./.npmrc + # Restore the committed .npmrc (pnpm workspace config such as + # node-linker=hoisted). NPM_PUBLISH overwrote it with a publish + # auth token, but the Dockerfile COPYs .npmrc for the in-image + # pnpm install, so it needs the config file present and token-free. + git checkout -- .npmrc # Set our version number using vars export IMAGE_VERSION=$(cat version.txt) export IMAGE_VERSION_FULL=v$IMAGE_VERSION @@ -323,7 +329,11 @@ jobs: exit 0 else echo "Building and pushing Docker image from the master branch (beta releases)" - rm -f ./.npmrc + # Restore the committed .npmrc (pnpm workspace config such as + # node-linker=hoisted). NPM_PUBLISH overwrote it with a publish + # auth token, but the Dockerfile COPYs .npmrc for the in-image + # pnpm install, so it needs the config file present and token-free. + git checkout -- .npmrc # Set our version number using vars export IMAGE_VERSION=$(cat version.txt) @@ -357,7 +367,11 @@ jobs: exit 0 else echo "Building and pushing ARM64 Docker image from the master branch (beta releases)" - rm -f ./.npmrc + # Restore the committed .npmrc (pnpm workspace config such as + # node-linker=hoisted). NPM_PUBLISH overwrote it with a publish + # auth token, but the Dockerfile COPYs .npmrc for the in-image + # pnpm install, so it needs the config file present and token-free. + git checkout -- .npmrc # Set our version number using vars export IMAGE_VERSION=$(cat version.txt) export IMAGE_VERSION_FULL=v$IMAGE_VERSION