Skip to content

Commit

Permalink
Throw error when running outside GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Oct 4, 2023
1 parent 6cd6f2a commit 169ab33
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ object BundleMonPlugin extends AutoPlugin {

override lazy val projectSettings: Seq[Setting[_]] = Seq(
Compile / bundleMon := {
if (!Option(System.getenv("GITHUB_ACTIONS")).contains("true")) {
throw new RuntimeException(
"GITHUB_ACTIONS env variable is not set. The `bundleMon` task can only be run in GHA CI."
)
}

val maxSize = bundleMonMaxSize.value
val maxPercentIncrease = bundleMonMaxPercentIncrease.value
val compression = bundleMonCompression.value
Expand Down

0 comments on commit 169ab33

Please sign in to comment.