-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (60 loc) · 1.71 KB
/
build-dev-mock.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Build and deploy mocket versjon av aap-soknad
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '**.md'
env:
IMAGE_SUFFIX: dev-gcp-mock
jobs:
buildMock:
name: build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
env:
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
SKIP_YARN_COREPACK_CHECK: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com
cache: yarn
- name: Enable Corepack
run: corepack enable
- name: Cache client node_modules
id: cache-node-modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- name: install dependencies Yarn
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --immutable
- name: Copy env-file # TODO: Se om vi kan finne en bedre løsning her på sikt
run: cp .nais/dev-mock.env .env
- name: run build
run: yarn run build
- uses: nais/docker-build-push@v0
with:
team: aap
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
image_suffix: dev-gcp-mock
tag: ${{ github.sha }}
deployMock:
needs: buildMock
uses: navikt/aap-workflows/.github/workflows/deploy.yml@main
permissions:
contents: read
id-token: write
secrets: inherit
with:
cluster: dev-gcp
manifest: .nais/dev-mock.yaml
imageSuffix: -dev-gcp-mock