We allow skipping a build in CircleCI by passing either
[ci skip] or
[skip ci] tag in the first line of the body of the commit or the commit’s title.
However, there are a few circumstances where this will not skip the build:
- The build is associated with a forked PR
- The build is associated with a scheduled build
- The build is generated from the "Trigger a new pipeline" API endpoint
- The build is triggered via a tag
- You include it at the end of a commit body that has more than 247 characters
With the above in mind, to ensure builds are skipped, always try to include the tag in the subject of the commit or the very start of the commit body.
If you need to skip a build triggered from the API you will want to consider implementing pipeline parameters that you can pass when triggering the build that will flag the build not to run (think a boolean that defaults to
true and if you pass
false workflows won't run).