Main test workflow to call another and wait #8
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: 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" |