Skip to content

Commit

Permalink
Reusable action for yarn setup + install.
Browse files Browse the repository at this point in the history
Reduserer duplisering av kode i pipeline.
  • Loading branch information
josstn committed Jun 3, 2024
1 parent d0132cd commit 1366714
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
23 changes: 23 additions & 0 deletions .github/actions/setup-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Setup + Install
description: Run commands needed to setup yarn and install dependencies.
inputs:
npmAuthToken:
description: Token that has packages:read permission for the navikt organization
required: true

runs:
using: composite
steps:
- uses: ../setup-yarnrc
with:
npmAuthToken: ${{ inputs.npmAuthToken }}

- name: Sette opp node
uses: actions/setup-node@v4
with:
node-version: '18'
cache: yarn

- name: Installere dependencies
shell: bash
run: HUSKY=0 yarn install --immutable
12 changes: 2 additions & 10 deletions .github/workflows/lint-tscheck-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,11 @@ jobs:
- name: Hente kode
uses: actions/checkout@v4

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

- name: Sette opp Node
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'yarn'

- name: Installere dependencies
run: HUSKY=0 yarn install --immutable

- name: Typescript-sjekk
run: yarn ts-check

Expand Down

0 comments on commit 1366714

Please sign in to comment.