-
-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST] Send multiple events at once #331
Comments
Yeah, I need this too. I can work on this issue if it's fine |
Please could you explain your problem in more detail, preferably with examples. My current recommendation is to use a matrix, as described in the readme. Could you explain why that doesn't work for your use case(s). |
For example if we use the matrix, the same workflow runs twice (duplicate run for other steps) instead dispatch I want to dispatch to multiple repos or multiple events in single step Example: - name: Repo dispatch
uses: peter-evans/repository-dispatch@v3
with:
event-type: ${{ matrix.events }} PS: well to avoid this I can run repo dispatch in separate jobs as a workaround but still for cases in same job |
My personal use case is to dispatch multiple events in a row, not to dispatch an event to multiple repos. The goal is to use your workflow once instead of N times, and do not break the total limit. ExampleDo this: jobs:
ci_tests:
runs-on: 'ubuntu-latest'
steps:
- name: Test component A, B, C
uses: peter-evans/repository-dispatch@v3
with:
event-types: [test_compA, test_compB, test_compC] instead of this: jobs:
ci_tests:
runs-on: 'ubuntu-latest'
steps:
- name: Test component A
uses: peter-evans/repository-dispatch@v3
with:
event-type: test_compA
- name: Test component B
uses: peter-evans/repository-dispatch@v3
with:
event-type: test_compB
- name: Test component C
uses: peter-evans/repository-dispatch@v3
with:
event-type: test_compC |
@Badisi Exactly the same use case for me too. By using matrix it's same as jobs:
ci_tests:
runs-on: 'ubuntu-latest'
steps:
- name: Test component A
uses: peter-evans/repository-dispatch@v3
with:
event-type: test_compA
- name: Test component B
uses: peter-evans/repository-dispatch@v3
with:
event-type: test_compB
- name: Test component C
uses: peter-evans/repository-dispatch@v3
with:
event-type: test_compC |
Or it can be jobs:
ci_tests:
runs-on: 'ubuntu-latest'
steps:
- name: Test component A, B, C
uses: peter-evans/repository-dispatch@v3
with:
event-types: test_compA, test_compB, test_compC |
Thanks for this GH action !
I was wondering if it would be possible to send multiple events at once ?
I'm currently reusing too many workflows and hitting the error "too many workflows are referenced, total: 22, limit: 20".
See the documentation.
So it would be great to only use your job once and send all my events, instead of having to use a job per event.
The text was updated successfully, but these errors were encountered: