That is correct. By default, a workflow only runs when a pull_request's activity type is opened, synchronize, or reopened. If you want to run a workflow when a PR is closed (and merged), you have to specifically set the closed type in the trigger conditions:
on: pull_request: types: [closed]
Additionally, to only make a job run when a PR was actually merged and not just closed without being merged, add the an "if" condition to your job(s) that checks if the merged property of the event is true:
jobs: deploy: runs-on: ubuntu-latest if: github.event.pull_request.merged steps: - name: Do stuff here...
Can it be that the issue here is that the PR is opened by automaticly and merged by another action?
You can see that the first sync.yml is doing auto repo sync and the second ci.yml should be triggered on every PUSH/PR
Events that are raised by the actions bot will not trigger other actions workflows. This is to prevent you from getting in to an endless loop of worklfow runs. We are looking at options to relax this restriction but we don't have any specifics yet.