Skip to content

Commit

Permalink
Fixes & improvements for the actions\spring-dispatch-workflow-and-wait
Browse files Browse the repository at this point in the history
  • Loading branch information
artembilan committed Aug 27, 2024
1 parent a01a65d commit 657a692
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
13 changes: 2 additions & 11 deletions .github/actions/spring-dispatch-workflow-and-wait/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ inputs:
runs:
using: composite
steps:

- uses: actions/checkout@v4
with:
show-progress: false

- name: Dispatch workflow and wait
shell: bash
env:
Expand All @@ -29,11 +24,7 @@ runs:
dispatchDate=$(date -Iseconds)
workflowFile=${{ inputs.workflow }}
if [ '${{ inputs.inputs }}' ]; then
echo '${{ inputs.inputs }}' | gh workflow run $workflowFile --json
else
gh workflow run $workflowFile
fi
echo '${{ inputs.inputs }}' | gh workflow run $workflowFile --json
sleep 60
Expand All @@ -45,7 +36,7 @@ runs:
currentWorkflowRunUrl=$(echo "$run_data" | jq -r '.html_url')
echo "::notice title=Dispatched workflow run::$currentWorkflowRunUrl"
echo "::notice file=$workflowFile,title=Dispatched workflow run::$currentWorkflowRunUrl"
while true; do
run_data=$(gh api repos/$GITHUB_REPOSITORY/actions/runs/$currentWorkflowRunId)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-call-workflow-and-wait.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
show-progress: false
ref: ${{ env.WORKFLOWS_REF }}

- name: Build and Publish
- name: Dispatch Workflow
timeout-minutes: 30
uses: ./spring-github-workflows/.github/actions/spring-dispatch-workflow-and-wait
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-other-workflow-to-call.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
steps:
- run: |
sleep 60
echo "::notice The other workflow is done for ${{ inputs.anInput }}"
echo "::notice title=The other workflow is done for::${{ inputs.anInput }}"

0 comments on commit 657a692

Please sign in to comment.