.github/workflows/all.workflows.yml #672
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| workflow_dispatch: | |
| inputs: | |
| workflow: | |
| type: choice | |
| description: "Backend or frontend. These use slightly different workflows." | |
| 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!" | |
| default: false | |
| force-deploy-idporten: | |
| type: boolean | |
| description: "Deploy to idporten? Make sure the effective working directory contains a config.idporten.yml! Note: Only relevant for dolly-frontend." | |
| 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." | |
| default: false | |
| sonar-enabled: | |
| type: boolean | |
| description: "Run Sonar scan?" | |
| default: false | |
| jobs: | |
| backend: | |
| if: inputs.workflow == 'backend' | |
| uses: ./.github/workflows/common.workflow.backend.yml | |
| permissions: | |
| contents: read | |
| id-token: write | |
| 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 | |
| permissions: | |
| contents: read | |
| id-token: write | |
| packages: write | |
| 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-idporten }} | |
| sonar-enabled: ${{ inputs.sonar-enabled }} | |
| secrets: inherit |