HomeProjects
 
  
🔍

Conditional GitHub action based on commit message

October 13, 2021

It's really annoying having a certain build/deployment GitHub action run on every push.

You can use this to run it based on the commit message's content:

name: Publish
on:
push:
branches:
- master
jobs:
publish:
if: "contains(github.event.head_commit.message, '[build]')"

Feel free to change the '[build]' part with whatever string you want.

You can also put a ! at the beginning to invert the logic (Run the action on commit messages that DON'T contain a certain string)

CRLF: Mind the line

June 15, 2021

Problems line endings might create, why different operating systems sometimes use different line endings and how to configure git to save yourself from headaches.

read more →

2020

 

© 2024. Made with ♡ by me :)