How do I specify conditions for a push event when defining a workflow?

I’d like to create a workflow where the master branch is merged into the other branches when there’s a release.

I know a release has happened when there’s a commit by a certain user and a commit message that says “Version bump”.

How can I check for that?

@stong2351,

You can use the expression “github.event.head_commit.message” to get the message of the head_commit from the github context for the push event.
Then, use the contains function to check if the commit message contains the keyword “Version bump”.
For example:

on:
  push:

jobs:
  release:
    if: ${{ contains( github.event.head_commit.message, 'Version bump' ) }}