mirror of
https://github.com/kamilchodola/wait-for-workflow-action.git
synced 2026-03-11 18:13:50 -05:00
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: Test WaitForWorkflow
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
inputs:
|
|
ref:
|
|
description: 'branch'
|
|
required: false
|
|
default: ''
|
|
run_id:
|
|
description: 'run_id for test'
|
|
required: false
|
|
default: ''
|
|
jobs:
|
|
test_workflow_dispatch:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Trigger another workflow
|
|
uses: benc-uk/workflow-dispatch@v1
|
|
with:
|
|
workflow: to_be_triggered.yml
|
|
token: ${{ secrets.REPOSITORY_DISPATCH_TOKEN }}
|
|
ref: "${{ inputs.ref || github.ref }}"
|
|
|
|
- name: Wait for the triggered workflow to complete
|
|
uses: kamilchodola/wait-for-workflow-action@kch/fix_permissions
|
|
with:
|
|
GITHUB_TOKEN=${{ secrets.REPOSITORY_DISPATCH_TOKEN }}
|
|
WORKFLOW_ID='to_be_triggered.yml'
|
|
RUN_ID=${{ inputs.run_id }}
|
|
MAX_WAIT_MINUTES='2'
|
|
INTERVAL='5'
|
|
TIMEOUT='5'
|
|
ORG_NAME='kamilchodola'
|
|
REPO_NAME='wait-for-workflow-action'
|
|
REF=${{ inputs.ref || github.ref }}
|