users
-> collaborators
(#2464)
#1557
This file contains 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
name: Build and push Docker images | |
on: | |
push: | |
branches: | |
- 'master' | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
inputs: | |
branch: | |
type: string | |
default: master | |
description: Branch to build images from | |
required: false | |
gateway: | |
type: boolean | |
default: true | |
description: Build new image of api-gateway | |
required: false | |
backend: | |
type: boolean | |
default: true | |
description: Build new image of save-backend | |
required: false | |
frontend: | |
type: boolean | |
default: true | |
description: Build new image of save-frontend | |
required: false | |
orchestrator: | |
type: boolean | |
default: true | |
description: Build new image of save-orchestrator | |
required: false | |
sandbox: | |
type: boolean | |
default: true | |
description: Build new image of save-sandbox | |
required: false | |
preprocessor: | |
type: boolean | |
default: true | |
description: Build new image of save-preprocessor | |
required: false | |
demo: | |
type: boolean | |
default: true | |
description: Build new image of save-demo | |
required: false | |
demo-cpg: | |
type: boolean | |
default: true | |
description: Build new image of save-demo-cpg | |
required: false | |
jobs: | |
build_cli: | |
name: Build save-cli | |
uses: ./.github/workflows/build_save-cli_reusable.yml | |
deploy_backend: | |
name: save-backend | |
uses: ./.github/workflows/deploy_images_reusable.yml | |
needs: build_cli | |
with: | |
module: save-backend | |
branch: ${{ inputs.branch }} | |
do-build: ${{ github.event_name != 'workflow_dispatch' || inputs.backend }} | |
override-docker-tag: ${{ github.event_name == 'workflow_dispatch' }} | |
save-cli-version: ${{ needs.build_cli.outputs.version }} | |
deploy_sandbox: | |
name: save-sandbox | |
uses: ./.github/workflows/deploy_images_reusable.yml | |
needs: build_cli | |
with: | |
module: save-sandbox | |
branch: ${{ inputs.branch }} | |
do-build: ${{ github.event_name != 'workflow_dispatch' || inputs.sandbox }} | |
override-docker-tag: ${{ github.event_name == 'workflow_dispatch' }} | |
save-cli-version: ${{ needs.build_cli.outputs.version }} | |
deploy_all: | |
name: all excluding save-backend and save-sandbox | |
strategy: | |
fail-fast: false | |
matrix: | |
module: [ | |
'api-gateway', | |
'save-frontend', | |
'save-orchestrator', | |
'save-preprocessor', | |
'save-demo', | |
'save-demo-cpg', | |
] | |
include: | |
- module: api-gateway | |
do-build: ${{ inputs.gateway }} | |
- module: save-frontend | |
do-build: ${{ inputs.frontend }} | |
- module: save-orchestrator | |
do-build: ${{ inputs.orchestrator }} | |
- module: save-preprocessor | |
do-build: ${{ inputs.preprocessor }} | |
- module: save-demo | |
do-build: ${{ inputs.demo }} | |
- module: save-demo-cpg | |
do-build: ${{ inputs.demo-cpg }} | |
uses: ./.github/workflows/deploy_images_reusable.yml | |
with: | |
module: ${{ matrix.module }} | |
branch: ${{ inputs.branch }} | |
do-build: ${{ github.event_name != 'workflow_dispatch' || matrix.do-build }} | |
override-docker-tag: ${{ github.event_name == 'workflow_dispatch' }} | |
save-cli-version: stub |