Skip to content

Commit

Permalink
Adjust the 'dependency-submission' job condition
Browse files Browse the repository at this point in the history
  • Loading branch information
danicheg committed Jul 23, 2024
1 parent 323c9ef commit 968d6ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ci/src/main/scala/org/typelevel/sbt/TypelevelCiPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ object TypelevelCiPlugin extends AutoPlugin {
githubWorkflowAddedJobs ++= {
val dependencySubmission =
if (tlCiDependencyGraphJob.value) {
val githubRepo = GitHelper.extractGitHubUserRepo.map(x => x._1 + '/' + x._2)
val ghRepo = GitHelper.extractGitHubUserRepo.map(x => x._1 + '/' + x._2)
val ghEventCond = "github.event_name != 'pull_request'"
val ghRepoCond = (repo: String) => s"github.repository == '$repo'"
val jobCondition =
githubRepo.fold(
"github.event_name != 'pull_request'"
)(repo => s"github.repository == '$repo' && github.event_name != 'pull_request'")
ghRepo.fold(ghEventCond)(repo => s"${ghRepoCond(repo)} && $ghEventCond")

List(
WorkflowJob(
Expand Down

0 comments on commit 968d6ab

Please sign in to comment.