Files
wait-for-workflow-action/.github/workflows/test.yml
Kamil Chodoła 935e6e7065 Update test.yml
2023-04-26 18:18:16 +02:00

32 lines
849 B
YAML

name: Test WaitForWorkflow
on:
push:
branches:
- main
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_id: your-workflow-id
token: ${{ secrets.REPOSITORY_DISPATCH_TOKEN }}
ref: main
- name: Wait for the triggered workflow to complete
run: |
chmod +x wait-for-workflow.sh
export GITHUB_TOKEN="${{ secrets.REPOSITORY_DISPATCH_TOKEN }}"
export WORKFLOW_ID="to_be_triggered"
export MAX_WAIT_MINUTES="3"
export ORG_NAME="kamilchodola"
export REPO_NAME="wait-for-workflow-action"
export REF="main"
./wait-for-workflow.sh