File tree Expand file tree Collapse file tree 4 files changed +44
-32
lines changed Expand file tree Collapse file tree 4 files changed +44
-32
lines changed Original file line number Diff line number Diff line change 1+ name : Setup yarn config 
2+ description : Run yarn config commands so that @navikt/ packages are resolved from github package registry, with neccessary auth. 
3+ inputs :
4+   npmAuthToken :
5+     description : Token that has packages:read permission for the navikt organization. 
6+     required : true 
7+ 
8+ runs :
9+   using : composite 
10+   steps :
11+     - name : Setup yarn config 
12+       shell : bash 
13+       run : | 
14+         yarn config set npmScopes.navikt.npmRegistryServer "https://npm.pkg.github.com" 
15+         yarn config set npmScopes.navikt.npmAlwaysAuth true  
16+         yarn config set npmScopes.navikt.npmAuthToken ${{ inputs.npmAuthToken }} 
Original file line number Diff line number Diff line change 1010
1111jobs :
1212  codeql :
13-    name : CodeQl 
14-    permissions :
15-      actions : read 
16-      contents : read 
17-      security-events : write 
18-    uses : navikt/fp-gha-workflows/.github/workflows/codeql.yml@main 
19-    with :
20-     language : javascript 
21-    secrets : inherit 
13+     name : CodeQl 
14+     permissions :
15+       actions : read 
16+       contents : read 
17+       security-events : write 
18+     uses : navikt/fp-gha-workflows/.github/workflows/codeql.yml@main 
19+     with :
20+       language : javascript 
21+     secrets :
22+       READER_TOKEN : ${{ secrets.READER_TOKEN }} 
Original file line number Diff line number Diff line change 1010      contents : write 
1111      pages : write 
1212    uses : navikt/fp-gha-workflows/.github/workflows/deploy-storybook.yml@main 
13-     secrets : inherit 
13+     secrets :
14+       READER_TOKEN : ${{ secrets.READER_TOKEN }} 
Original file line number Diff line number Diff line change 77    timeout-minutes : 30 
88    steps :
99      - uses : actions/checkout@v5 
10+ 
11+       - uses : ./.github/actions/setup-yarnrc 
1012        with :
11-           fetch-depth :  0 
13+           npmAuthToken :  ${{ inputs.npmAuthToken }} 
1214
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-           
21-       - uses : actions/setup-node@v6 
15+       - name : Sette opp node 
16+         uses : actions/setup-node@v6 
2217        with :
2318          node-version : 22.17.1 
24-           cache : ' yarn' 
19+           cache : yarn 
2520
2621      - name : Installere dependencies 
22+         shell : bash 
2723        run : yarn install --immutable 
2824
2925      - name : Bygg 
@@ -53,20 +49,18 @@ jobs:
5349        with :
5450          fetch-depth : 0 
5551
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-           
64-       - uses : actions/setup-node@v6 
52+       - uses : ./.github/actions/setup-yarnrc 
53+         with :
54+           npmAuthToken : ${{ inputs.npmAuthToken }} 
55+ 
56+       - name : Sette opp node 
57+         uses : actions/setup-node@v6 
6558        with :
6659          node-version : 22.17.1 
67-           cache : ' yarn' 
68-            
60+           cache : yarn 
61+ 
6962      - name : Installere dependencies 
63+         shell : bash 
7064        run : yarn install --immutable 
7165
7266      - name : Run knip 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments