-
Select Topic AreaBug BodyHi all, I have these two simple steps that I use to determinate if the CICD should run or not:
It just checks if the latests commit message contains As far as I can see it's because when I push commits to a feature branch, the commit message is changed to something like This causes the CICD to always run. Any idea or suggestion regarding this issue? Thank you. Best Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I have the same issue. GitHub creates an automatic merge commit where they merge This can be useful if the intention is for it to be merged and for the combined result to work well on It should be quite easy to work around though, you can skip this merge commit and go to the first parent. There are many ways to do that, i.e. you could Or you could handle it in the code by just looking at what you need, i.e. for your example, this should probably fix it: - name: Last Commit
id: last-commit
- run: echo "last_commit=$(git log -1 --format=%B | head -n 1)" >> $GITHUB_OUTPUT
+ run: |
+ git fetch
+ echo "last_commit=$(git log -1 --format=%s ${GITHUB_HEAD_REF:-HEAD})" >> $GITHUB_OUTPUT |
Beta Was this translation helpful? Give feedback.
I have the same issue. GitHub creates an automatic merge commit where they merge
main
back into the branch before running it. So that all changes frommain
are also included in the branch.This can be useful if the intention is for it to be merged and for the combined result to work well on
main
. Like an optimistic merge queue with less waiting. However, I'm also not thrilled about it, especially that I don't know about it, and it seems very hard to get information about what happens.It should be quite easy to work around though, you can skip this merge commit and go to the first parent. There are many ways to do that, i.e. you could
git checkout HEAD^
, or maybe evengit checkout ${GITHU…