Skip to content

.github/workflows/all.workflows.yml #195

.github/workflows/all.workflows.yml

.github/workflows/all.workflows.yml #195

Workflow file for this run

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