File tree 3 files changed +46
-12
lines changed
3 files changed +46
-12
lines changed Original file line number Diff line number Diff line change 23
23
jobs :
24
24
build :
25
25
name : Build
26
+ if : github.ref == 'refs/heads/main' # Only deploy to prod from main branch
26
27
permissions :
27
28
contents : read
28
- packages : write
29
29
id-token : write
30
30
uses : navikt/familie-baks-gha-workflows/.github/workflows/build-yarn-app.yaml@main
31
31
with :
Original file line number Diff line number Diff line change 1
- name : Manual deploy
1
+ name : Manual deploy to dev
2
2
on :
3
3
workflow_dispatch :
4
4
inputs :
5
- environment :
6
- description : " Environment to deploy to"
7
- required : true
8
- type : choice
9
- options :
10
- - dev
11
- - prod
12
5
skip-tests :
13
6
description : ' Skip tests?'
14
7
default : false
26
19
name : Build
27
20
permissions :
28
21
contents : read
29
- packages : write
30
22
id-token : write
31
23
uses : navikt/familie-baks-gha-workflows/.github/workflows/build-yarn-app.yaml@main
32
24
with :
44
36
uses : navikt/familie-baks-gha-workflows/.github/workflows/deploy.yaml@main
45
37
with :
46
38
image : ${{ needs.build.outputs.image }}
47
- cluster : ${{ inputs.environment }} -gcp
48
- resource : .nais/app-${{ inputs.environment }} .yaml
39
+ cluster : dev -gcp
40
+ resource : .nais/app-dev .yaml
49
41
secrets : inherit
Original file line number Diff line number Diff line change
1
+ name : Manual deploy to prod (from main)
2
+ on :
3
+ workflow_dispatch :
4
+ inputs :
5
+ skip-tests :
6
+ description : ' Skip tests?'
7
+ default : false
8
+ type : boolean
9
+ skip-validation :
10
+ description : ' Skip validation? (eslint, prettier, typecheck)'
11
+ default : false
12
+ type : boolean
13
+
14
+ env :
15
+ BASE_PATH : /barnetrygd/soknad/
16
+
17
+ jobs :
18
+ build :
19
+ name : Build
20
+ if : github.ref == 'refs/heads/main' # Only deploy to prod from main branch
21
+ permissions :
22
+ contents : read
23
+ id-token : write
24
+ uses : navikt/familie-baks-gha-workflows/.github/workflows/build-yarn-app.yaml@main
25
+ with :
26
+ build-image : true
27
+ push-image : true
28
+ skip-tests : ${{ inputs.skip-tests }}
29
+ skip-validation : ${{ inputs.skip-validation }}
30
+ base-path : ${{ env.BASE_PATH }}
31
+ secrets : inherit
32
+ deploy-with-new-image :
33
+ name : Deploy with new image
34
+ permissions :
35
+ id-token : write
36
+ needs : [ build ]
37
+ uses : navikt/familie-baks-gha-workflows/.github/workflows/deploy.yaml@main
38
+ with :
39
+ image : ${{ needs.build.outputs.image }}
40
+ cluster : prod-gcp
41
+ resource : .nais/app-prod.yaml
42
+ secrets : inherit
You can’t perform that action at this time.
0 commit comments