Skip to content

Commit 1366714

Browse files
committed
Reusable action for yarn setup + install.
Reduserer duplisering av kode i pipeline.
1 parent d0132cd commit 1366714

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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: ../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: '18'
19+
cache: yarn
20+
21+
- name: Installere dependencies
22+
shell: bash
23+
run: HUSKY=0 yarn install --immutable

.github/workflows/lint-tscheck-build.yml

+2-10
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,11 @@ jobs:
1919
- name: Hente kode
2020
uses: actions/checkout@v4
2121

22-
- uses: ./.github/actions/setup-yarnrc
22+
- name: Setup + install
23+
uses: ./.github/actions/setup-install
2324
with:
2425
npmAuthToken: ${{ secrets.READER_TOKEN }}
2526

26-
- name: Sette opp Node
27-
uses: actions/setup-node@v4
28-
with:
29-
node-version: '18'
30-
cache: 'yarn'
31-
32-
- name: Installere dependencies
33-
run: HUSKY=0 yarn install --immutable
34-
3527
- name: Typescript-sjekk
3628
run: yarn ts-check
3729

0 commit comments

Comments
 (0)