Skip to content

Commit 337e49c

Browse files
authored
GA: Fiks problemer med token under installasjon av avhengigheter (#3754)
1 parent e3673d5 commit 337e49c

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

.github/workflows/valider-pull-request.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@ jobs:
1010
with:
1111
fetch-depth: 0
1212

13+
- name: Sette yarn-config
14+
run: |
15+
yarn config set npmScopes.navikt.npmRegistryServer "https://npm.pkg.github.com"
16+
yarn config set npmScopes.navikt.npmAlwaysAuth true
17+
yarn config set npmScopes.navikt.npmAuthToken $NPM_AUTH_TOKEN
18+
env:
19+
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
20+
1321
- uses: actions/setup-node@v4
1422
with:
1523
node-version: 22.17.1
1624
cache: 'yarn'
17-
registry-url: https://npm.pkg.github.com/
18-
always-auth: true
19-
token: ${{ secrets.GITHUB_TOKEN }}
2025

2126
- name: Installere dependencies
2227
run: yarn install --immutable
@@ -48,14 +53,19 @@ jobs:
4853
with:
4954
fetch-depth: 0
5055

56+
- name: Sette yarn-config
57+
run: |
58+
yarn config set npmScopes.navikt.npmRegistryServer "https://npm.pkg.github.com"
59+
yarn config set npmScopes.navikt.npmAlwaysAuth true
60+
yarn config set npmScopes.navikt.npmAuthToken $NPM_AUTH_TOKEN
61+
env:
62+
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
63+
5164
- uses: actions/setup-node@v4
5265
with:
5366
node-version: 22.17.1
54-
registry-url: https://npm.pkg.github.com/
55-
always-auth: true
56-
token: ${{ secrets.GITHUB_TOKEN }}
5767
cache: 'yarn'
58-
68+
5969
- name: Installere dependencies
6070
run: yarn install --immutable
6171

0 commit comments

Comments
 (0)