Trigger default branch workflow on fast forward merge push.

Hi! New to github actions and trying to set things up.

I spent a good amount of time in github actions docs but I have difficulties to express my problem. Therefore I may have missed the relevant part…

Anyway, I use the following workflow :

$ git checkout master # here is my default branch
$ git checkout develop # here is my development/unstable branch
$ # make some changes
$ git add ...
$ git commit ...
$ # repeat while new feature development is finished ...
$ git push # optionally push to origin/develop branch -> triggers workflow -> passed -> all OK
$ git checkout master
$ git merge --ff-only develop
$ git push # push to origin/master -> triggers workflow on develop branch instead of master =(

With the following configuration (rust specific):

name: Rust

on: [push]


        runs-on: ubuntu-latest

        - uses: actions/checkout@v2
        - name: Build
          run: cargo build --verbose
        - name: Run tests
          run: cargo test --verbose

Pushing the master branch with only a fast forward merge does not trigger a build on master branch but on the develop branch. Is it possible to trigger default branch build (here master) when pushing only a fast-forward merge to origin ?

Thanks for your help.

  • logan

Sorry for letting you suffer this issue. This is an known issue for fast-forward merge. Github Team is tracking on it. 

Currently, I would not encourage you to use fast forward merge when push to master.  

Thanks for your answer!

Hi! I’m also affected by this problem, and I have not found any other reference to it by googling aside from this thread.

Is there any URL I could bookmark that tracks this issue? Thanks!