mirror of
https://github.com/kamilchodola/wait-for-workflow-action.git
synced 2026-04-29 23:57:36 -05:00
50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
name: 'Wait for Workflow Action'
|
|
description: 'Waits for a specified workflow to complete before proceeding'
|
|
inputs:
|
|
GITHUB_TOKEN:
|
|
description: 'GitHub token to access the repository'
|
|
required: true
|
|
workflow_id:
|
|
description: 'ID of the workflow to wait for'
|
|
required: false
|
|
run_id:
|
|
description: 'If provided will wait for workflow run with specified id'
|
|
required: false
|
|
max_wait_minutes:
|
|
description: 'Maximum time script will wait to workflow run to be found in minutes'
|
|
required: true
|
|
default: '5'
|
|
interval:
|
|
description: 'Interval in seconds which will be used for GitHub API calls.'
|
|
required: true
|
|
default: '10'
|
|
timeout:
|
|
description: 'Maximum time script will wait to workflow run to be finished'
|
|
required: true
|
|
default: '30'
|
|
org_name:
|
|
description: 'GitHub organization name'
|
|
required: true
|
|
repo_name:
|
|
description: 'GitHub repository name'
|
|
required: true
|
|
ref:
|
|
description: 'Branch reference (if empty, ref selected for trigger would be taken)'
|
|
required: false
|
|
default: ''
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- run: ${{ github.action_path }}/scripts/wait-for-workflow.sh
|
|
shell: bash
|
|
env:
|
|
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
|
|
WORKFLOW_ID: ${{ inputs.workflow_id }}
|
|
RUN_ID: ${{ inputs.run_id }}
|
|
MAX_WAIT_MINUTES: ${{ inputs.max_wait_minutes }}
|
|
INTERVAL: ${{ inputs.interval }}
|
|
TIMEOUT: ${{ inputs.timeout }}
|
|
ORG_NAME: ${{ inputs.organization }}
|
|
REPO_NAME: ${{ inputs.repository }}
|
|
REF: ${{ inputs.ref }
|