From a28ff41a7535f51834d99ea9821659cb8b1cd2d5 Mon Sep 17 00:00:00 2001 From: mkorwel Date: Tue, 21 Oct 2025 18:02:54 -0700 Subject: [PATCH] fix(ci): Add npmrc configuration to E2E workflow This commit adds a step to the E2E workflow to create an .npmrc file and configure it with the necessary credentials for the GitHub Packages registry. This resolves the '401 Unauthorized' error that was occurring during the 'npm ci' step. --- .github/workflows/e2e.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 40feb87df9..d9dd36d58a 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -77,6 +77,11 @@ jobs: with: node-version: '${{ matrix.node-version }}' + - name: 'Configure npm for GitHub Packages' + run: | + echo "@google-gemini:registry=https://npm.pkg.github.com/" > .npmrc + echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc + - name: 'Install dependencies' run: 'npm ci' @@ -130,6 +135,11 @@ jobs: with: node-version: '20.x' + - name: 'Configure npm for GitHub Packages' + run: | + echo "@google-gemini:registry=https://npm.pkg.github.com/" > .npmrc + echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc + - name: 'Install dependencies' run: 'npm ci' @@ -200,6 +210,12 @@ jobs: npm config set registry https://registry.npmjs.org/ shell: 'pwsh' + - name: 'Configure npm for GitHub Packages' + run: | + echo "@google-gemini:registry=https://npm.pkg.github.com/" > .npmrc + echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc + shell: 'pwsh' + - name: 'Install dependencies' run: 'npm ci' shell: 'pwsh'