Allow workflow to trigger based on git commit message
G
Ghowell
It would be useful to be able to trigger a job from a workflow based on a git commit message matching a pre defined regex. This could then be used to deploy code to a test server based on a commit message (i.e. "Some useful commit message #test001" would trigger a deploy to test server test001).
An example yaml may look something like this:
workflows: version: 2 test-and-deploy: jobs: - test - deploy: requires: - test filters: commit: only: - ^.*#((test|dev)([0-9]{3}))$
In the above example, the deploy job would only trigger if the commit message contained a match (i.e. #test001).
The commit message (or matched regex) would also need to be made available via an environment variable in order for the job to know which server to deploy to (similar to the way the tag is stored in $CIRCLE_TAG).
CCI-I-763
[
[[Unknown]]
Indeed this could be really useful, right i am using semantic release and i would like to filter jobs to that release commit. I haven't find a simple way to do it. Even chatgpt thinks that the feature exists :)))
K
Khalifah Shabazz
At least set a parameter for a workflow via commit message.
Rob Conings
+1
T
Tset No
+1