Skip to content

Commit

Permalink
Merge pull request #66 from armanbilge/pr/i64
Browse files Browse the repository at this point in the history
Throw error when running outside GHA
  • Loading branch information
armanbilge authored Oct 4, 2023
2 parents 6cd6f2a + 169ab33 commit 581f1d1
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 581f1d1

Please sign in to comment.