Is there any way to trigger a specific Github action workflow by commit-message value? For example, if I push with the commit message "smoke_test", only (one specific workflow ) smoke test workflow should trigger from a set of workflows. Please help, thanks!
Yes, there is. You can inspect trigger event if commit message contains specific keyword.
Here's an example:
name: Smoke tests
on: push
jobs:
test:
runs-on: [ ubuntu-latest ]
steps:
- name: Run smoke tests
if: contains(github.event.head_commit.message, 'smoke_test')
run: |
echo 'Running smoke tests!'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With