File tree Expand file tree Collapse file tree 4 files changed +49
-20
lines changed Expand file tree Collapse file tree 4 files changed +49
-20
lines changed Original file line number Diff line number Diff line change 1+ name : Setup + Install
2+ description : Run commands needed to setup yarn and install dependencies.
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+ - uses : ./.github/actions/setup-yarnrc
12+ with :
13+ npmAuthToken : ${{ inputs.npmAuthToken }}
14+
15+ - name : Sette opp node
16+ uses : actions/setup-node@v4
17+ with :
18+ node-version : 22.17.1
19+ cache : yarn
20+
21+ - name : Installere dependencies
22+ shell : bash
23+ run : HUSKY=0 yarn install --immutable
Original file line number Diff line number Diff line change 1+ name : Setup yarnrc.yml
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+ - shell : bash
12+ run : |
13+ corepack enable
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 @@ -10,18 +10,10 @@ jobs:
1010 with :
1111 fetch-depth : 0
1212
13- - uses : actions/setup-node@v4
13+ - name : Setup + Install
14+ uses : ./.github/actions/setup-install
1415 with :
15- node-version : 22.17.1
16- cache : ' yarn'
17- registry-url : https://npm.pkg.github.com
18- scope : ' @navikt'
19-
20- - name : Installere dependencies
21- run : yarn install --immutable
22- env :
23- NODE_AUTH_TOKEN : ${{ secrets.READER_TOKEN }}
24- NPM_AUTH_TOKEN : ${{ secrets.READER_TOKEN }}
16+ npmAuthToken : ${{ secrets.READER_TOKEN }}
2517
2618 - name : Bygg
2719 run : yarn build
@@ -50,16 +42,10 @@ jobs:
5042 with :
5143 fetch-depth : 0
5244
53- - uses : actions/setup-node@v4
45+ - name : Setup + Install
46+ uses : ./.github/actions/setup-install
5447 with :
55- node-version : 22.17.1
56- cache : ' yarn'
57-
58- - name : Installere dependencies
59- run : yarn install --immutable
60- env :
61- NODE_AUTH_TOKEN : ${{ secrets.READER_TOKEN }}
62- NPM_AUTH_TOKEN : ${{ secrets.READER_TOKEN }}
48+ npmAuthToken : ${{ secrets.READER_TOKEN }}
6349
6450 - name : Run knip
6551 run : |
8066 fi
8167 env :
8268 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
69+ 22 :
70+ 17 :
71+ 1 :
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ npmScopes:
55 navikt :
66 npmAlwaysAuth : true
77 npmRegistryServer : " https://npm.pkg.github.com"
8+ npmAuthToken : ${NPM_AUTH_TOKEN}
89
910plugins :
1011 - path : .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
You can’t perform that action at this time.
0 commit comments