by m_a_g · 5y ago · 0 comments
With the default GITHUB_TOKEN, you can't push to protected branches. If you decide to use personal access tokens, you can push to protected branches, BUT that will trigger other workflows. That can cause an infinite loop of workflows.
We still couldn't figure out how to push code to a protected branch without triggering the same/other workflows.
If you include `[skip ci]` anywhere in the commit message, that commit won't trigger any github actions. This is a built-in behavior; you don't have to manually check for that string in any downstream actions. I spent a long time trying to work around the same constraint before my colleague pointed out that `[skip ci]` was a thing.
if: "!contains(github.event.head_commit.message, 'DO_NOT_TRIGGER_ACTIONS')"