PromucFlow_constructor/.github/workflows/build-client-server.yml
Saroj d595eabf8a
ci: Allow to use existing docker image from a previous run if provided (#23901)
## Description
- Allow to use existing docker image from a previous run if provided

#### Type of change
- Workflow file changes

## Testing
- Workflow run
2023-05-31 12:37:40 +05:30

69 lines
1.7 KiB
YAML

name: Build Client, Server & Run only Cypress
on:
# This workflow can be triggered manually from the GitHub Actions page
workflow_dispatch:
inputs:
previous_run_id:
description: 'Run id to download the docker image artifact:'
required: false
type: string
default: "0"
jobs:
server-build:
name: server-build
if: inputs.previous_run_id == '0'
uses: ./.github/workflows/server-build.yml
secrets: inherit
with:
pr: 0
skip-tests: "true"
client-build:
name: client-build
if: inputs.previous_run_id == '0'
uses: ./.github/workflows/client-build.yml
secrets: inherit
with:
pr: 0
skip-tests: "true"
rts-build:
name: rts-build
if: inputs.previous_run_id == '0'
uses: ./.github/workflows/rts-build.yml
secrets: inherit
with:
pr: 0
build-docker-image:
needs: [ client-build, server-build, rts-build ]
# Only run if the build step is successful
if: success() && inputs.previous_run_id == '0'
name: build-docker-image
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
pr: 0
ci-test-limited:
needs: [ build-docker-image ]
# Only run if the build step is successful
if: success() && inputs.previous_run_id == '0'
name: ci-test-limited
uses: ./.github/workflows/ci-test-limited.yml
secrets: inherit
with:
pr: 0
ci-test-limited-existing-docker-image:
# Only run if the previous run-id is provided
if: inputs.previous_run_id != '0'
name: ci-test-limited
uses: ./.github/workflows/ci-test-limited.yml
secrets: inherit
with:
pr: 0
previous-workflow-run-id: ${{ fromJson(github.event.inputs.previous_run_id) }}