Skip to content

Commit a7915ae

Browse files
committed
legg til
småfix fjern endring i yarnrc legg til actions test simel fjern scope oppdater med ny variant test ut env på config oppsett test env variablel på install test fjern always auth forenkle yarn auth for @navikt repository
1 parent 1c24533 commit a7915ae

File tree

4 files changed

+44
-32
lines changed

4 files changed

+44
-32
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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 }}

.github/workflows/codeql-analysis.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ on:
1010

1111
jobs:
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 }}

.github/workflows/deploy-storybook.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ jobs:
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 }}

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

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,19 @@ jobs:
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

0 commit comments

Comments
 (0)