Quick tool to check if we are inside a CI environment
Find a file
Jonatan Nilsson d46e0d834e
Some checks failed
/ deploy (push) Failing after 14s
Minimize it further and clean it up
2024-11-22 05:08:16 +00:00
.forgejo/workflows Minimize it further and clean it up 2024-11-22 05:08:16 +00:00
.gitignore Initial commit 2024-11-18 23:24:04 +00:00
.npmrc remove package-lock.json 2024-11-19 00:03:24 +00:00
build.sh Minimize it further and clean it up 2024-11-22 05:08:16 +00:00
in.js Minimize it further and clean it up 2024-11-22 05:08:16 +00:00
LICENSE Initial commit 2024-11-18 23:24:04 +00:00
not.js Minimize it further and clean it up 2024-11-22 05:08:16 +00:00
package.json Minimize it further and clean it up 2024-11-22 05:08:16 +00:00
README.md readme: Add docs for in-ci and not-ci 2024-11-19 10:46:15 +00:00
test.mjs Minimize it further and clean it up 2024-11-22 05:08:16 +00:00

inside-ci

Quick tool to check if we are inside a CI environment

API

insideCi()

Returns true if inside CI. Otherwise returns false.

CLI

inside-ci or in-ci

Returns code 0 if inside CI. Otherwise returns an error code of 1.

  • inside-ci || echo 'We are not inside CI, install some stuff'
  • in-ci && echo 'We are inside CI, install some stuff'

Example:

is-ci || husky install

not-ci

Inverse of the above command