Skip to content

Main test workflow to call another and wait #8

Main test workflow to call another and wait

Main test workflow to call another and wait #8

name: Main test workflow to call another and wait
on:
workflow_dispatch:
inputs:
otherWorkflow:
description: 'Other workflow'
required: true
type: string
anInput:
description: 'Some input'
required: false
type: string
env:
WORKFLOWS_REF: main
jobs:
call-other-workflow-and-wait:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Checkout Common Repo
uses: actions/checkout@v4
with:
repository: spring-io/spring-github-workflows
path: spring-github-workflows
show-progress: false
ref: ${{ env.WORKFLOWS_REF }}
- name: Dispatch Workflow
timeout-minutes: 30
uses: ./spring-github-workflows/.github/actions/spring-dispatch-workflow-and-wait
with:
workflow: ${{ inputs.otherWorkflow }}
token: ${{ secrets.GITHUB_TOKEN }}
inputs: '{ "anInput": "${{ inputs.anInput }}" }'
next-job:
needs: call-other-workflow-and-wait
runs-on: ubuntu-latest
steps:
- run: echo "::notice The main workflow completed successfully"