I just realized this, and I am not sure if this is a bug or intented behavior.
When we have a normal workflow, an empty commit, created with
git commit --allow-empty -m "Empty commit"
will cause the workflow, which just specifies “on: push” to run. But when we add an “paths-ignore” option to the workflow like this
on: push: paths-ignore: - 'doc/**'
empty commits are suddenly not invoking the workflow anymore.
Also, and I think this is related to this, empty amend commits , which I create and then force-push on a clean working copy with
git commit --amend --no-edit git push -f
will not create a workflow run anymore for this commit, even when the original commit has changes which should not be ignored, which results in commits, that contain a change that should trigger a workflow, but does not have a workflow run. Without the paths-ignore option in the workflow, the empty amend commit always retriggers a workflow run.
Sometimes we need to rerun a workflow for the given (last) commit, and I used to do it on my personal feature branch (where only I work on) by the empty ammend commit, but this does not work anymore after we are ignoring paths now for the workflow. Any hints on how to solve this?