-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (52 loc) · 1.46 KB
/
deploy.yml
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
name: Build & Deploy
on: push
env:
APP: nav-epj
permissions:
contents: read
id-token: write
packages: write
jobs:
test-and-verify:
name: Test, lint and verify
runs-on: ubuntu-latest
steps:
- uses: navikt/teamsykmelding-github-actions-workflows/actions/yarn-cached@main
with:
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- run: yarn lint
- run: yarn tsc
# - run: yarn test
build-dev:
name: Build for dev
runs-on: ubuntu-latest
permissions:
packages: 'write'
contents: 'read'
id-token: 'write'
outputs:
image: ${{ steps.build-and-publish.outputs.image }}
steps:
- uses: navikt/teamsykmelding-github-actions-workflows/actions/next-to-docker@main
id: build-and-publish
with:
app: ${{ env.APP }}
env: dev
team: helseopplysninger
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy-dev-main:
name: Deploy main to dev
environment:
name: dev
url: https://epj.ekstern.dev.nav.no
runs-on: ubuntu-latest
needs: [build-dev, test-and-verify]
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: .nais/nais.yml
VAR: image=${{ needs.build-dev.outputs.image }}