-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (68 loc) · 2.45 KB
/
all.workflows.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
on:
workflow_dispatch:
inputs:
workflow:
type: choice
description: "Backend or frontend."
options:
- "backend"
- "frontend"
type:
type: choice
description: "Apps or proxies. Used to resolve the working directory together with name, as <type>/<name>."
options:
- "apps"
- "proxies"
cluster:
type: choice
description: "The cluster to deploy to."
options:
- "dev-gcp"
- "dev-fss"
- "prod-gcp"
name:
type: string
description: "The workflow name, e.g. dolly-backend. Used to resolve the working directory together with type, as <type>/<name>."
required: true
force-deploy:
type: boolean
description: "Deploy? Make sure the effective working directory contains a NAIS manifest as named below! Note: For dolly-frontend, this will also deploy with config.idporten.yml."
default: false
force-deploy-test:
type: boolean
description: "Deploy to test? Make sure the effective working directory contains a config.test.yml! Note: For dolly-frontend, this will also deploy with config.unstable.yml."
default: false
sonar-enabled:
type: boolean
description: "Run Sonar scan?"
default: true
permissions:
contents: read
id-token: write
jobs:
backend:
if: inputs.workflow == 'backend'
uses: ./.github/workflows/common.workflow.backend.yml
with:
cluster: ${{ inputs.cluster }}
working-directory: "${{ inputs.type }}/${{ inputs.name }}"
image-suffix: ${{ inputs.name }}
deploy-tag: ""
force-deploy: ${{ inputs.force-deploy }}
force-deploy-test: ${{ inputs.force-deploy-test }}
sonar-enabled: ${{ inputs.sonar-enabled }}
secrets: inherit
frontend:
if: inputs.workflow == 'frontend'
uses: ./.github/workflows/common.workflow.frontend.yml
with:
cluster: ${{ inputs.cluster }}
working-directory: "${{ inputs.type }}/${{ inputs.name }}"
image-suffix: ${{ inputs.name }}
deploy-tag: ""
force-deploy: ${{ inputs.force-deploy }}
force-deploy-test: ${{ inputs.force-deploy-test }}
force-deploy-idporten: ${{ inputs.name == 'dolly-frontend' && inputs.force-deploy }}
force-deploy-unstable: ${{ inputs.name == 'dolly-frontend' && inputs.force-deploy-test }}
sonar-enabled: ${{ inputs.sonar-enabled }}
secrets: inherit