Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github workflow event trigger synchronize not working?

I have the following github workflow definition:

name: Build

on:
    pull_request:
        types: [ opened, edited, synchronize ]
        paths-ignore:
            - '**.md'
    push:
        branches: 
            - main
jobs:
    get-job:
        name: My job
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v2

            - name: Say hello
              run: |
                    echo Hello!
  1. I create a pull request from the head-branch to base-branch. The workflow is triggered as expected.
  2. I commit and push a change to head-branch. The workflow is triggered as expected.
  3. I commit and push another change to head-branch. The workflow is NOT triggered as expected:

Synchronize not working

I have read the documentation and other sources, all of which describe the synchronize type as the type I need to use to ensure every new change in the PR triggers the workflow. Why does it work intermitently?

like image 710
Th3B0Y Avatar asked Apr 08 '26 01:04

Th3B0Y


1 Answers

In my case this was being caused due to the fact that the head branch and base branch of my PR had conflicts. I figured this out thanks to this other answer and no thanks due to github actions output which gave no clue of this whatsoever.

like image 98
Vito Avatar answered Apr 10 '26 20:04

Vito



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!