I'm having difficulties figuring out the syntax for triggering off of different event types.
For example the following gives me a "duplicated mapping key" error on the secod pull_request
trigger.
on:
pull_request:
types: [opened, reopened]
branches:
- main
- develop
pull_request:
types [synchronize]
branches:
- main
- develop
paths: ['**.h', '**.cpp', '**.hpp', '**.yaml', '**CMakeLists.txt', '**Makefile', '**.spec', '**.py', '**Dockerfile', '**conanfile.txt']
I want the workflow to always run when first opened (or reopened) but subsequently when the branch is synchronized it should only run if the changes are in one of the specified file types.
To clarify, I already have on.push event hook that's not shown here for the sake of brevity.
I do believe I neeed to have a pull_request.synchronize event to handle updated.
Can't find anything in the documentation on how to do that. I tried combining the two pull_requests triggers but then I'm getting an error that the "types" key is being duplicated.
Any ideas?