I have set up an action to be triggered on every push, but its steps to exit if the commit message doesn't conform to a specific pattern. This commit basically points to a new release, and occurs only on the master branch.
However, when after a new release, a new branch is forked from master and pushed to origin without any further commits, that action is triggered again.
Is there any way to specify that the action should not be triggered on pushing a new branch, but rather only fresh commits?
Workflow snippet:
name: Release APK on: push jobs: build: if: "contains(github.event.head_commit.message, 'apkRelease@@')" name: Build APK <...trimmed rest of the yaml> With this, when say commit C with message "apkRelease@@ver123" is pushed in master to correspond to a new release, the Build APK step would be triggered. But then if I fork a new dev branch and push it to origin without any commits, the action and step will be triggered again. This I want to prevent.