all: use cibuild.On

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
Josh Bleecher Snyder
2022-03-18 14:46:38 -07:00
committed by Josh Bleecher Snyder
parent b775df0b57
commit 32fd42430b
3 changed files with 9 additions and 8 deletions

View File

@@ -9,5 +9,7 @@ import "os"
// On reports whether the current binary is executing on a CI system.
func On() bool {
return os.Getenv("GITHUB_ACTIONS") != ""
// CI env variable is set by GitHub.
// https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
return os.Getenv("GITHUB_ACTIONS") != "" || os.Getenv("CI") == "true"
}