Block run of Github Actions per push?

I’m migrating over from Travis CI. They have a feature where you can skip a build by adding “[skip travis]” to a commit message.

Is there a similar feature with Github Actions? If not, can I request it?


Thanks for the feedback! We don’t have an out-of-the-box solution for skipping a build but you can use the if command to skip jobs if there is a particular keyword in the commit message. You can read more and share your feedback on it here. I will also escalate your feedback internally to get attention to this feature.

I’ve looked through the if documentation and don’t see a way to filter by commit message. I don’t see an environment variable or context variable that provides the commit message.

The github.event object should give you the webhook payload that triggers the workflow run. If you’re using the push event that should give you the payload here:

From inside that you should be able to look at the commits array of objects and then look for the message object inside the relevant commit.