モヒカンメモ

髪色が定期的に変わることに定評のある(比較的)若者Webエンジニアの備忘録

"[skip ci]" とコミットメッセージに書くと、CIをスキップできる

TravisCIやCircleCIを使ってCI/CDするのはだいぶメジャーになりましたね。

ドキュメントのみの更新時やwipのときなど、「git commitはしておきたいけどCIは走らせなくて良いだよな〜」というときありますよね。

そういうとき [skip ci] とコミットメッセージに含めておくとCIをskip出来て便利です。他にもいくつかバリエーションが有るので、手に馴染むものを使えば良さそう。

参考資料

TravisCI

docs.travis-ci.com

If you don’t want to run a build for a particular commit for any reason, you may instruct Travis CI to skip building this commit via a command in the commit message.

The command should be one of the following forms:

[ skip]

or

[skip ]

where is either ci, travis, travis ci, travis-ci, or travisci. For example,

[skip travis] Update README

CircleCI

circleci.com

By default, CircleCI automatically builds a project whenever you push changes to a version control system (VCS). You can override this behavior by adding a [ci skip] or [skip ci] tag anywhere in a commit’s title or description.