@@ -79,7 +79,10 @@ object SubmitDependencyGraph {
79
79
val storeAllManifests = scalaVersions.flatMap { scalaVersion =>
80
80
Seq (s " ++ $scalaVersion" , s " Global/ ${githubStoreDependencyManifests.key} $scalaVersion" )
81
81
}
82
- val commands = storeAllManifests :+ { if (local) { SubmitInternalLocal } else { SubmitInternal } }
82
+ val commands = storeAllManifests :+ {
83
+ if (local) { SubmitInternalLocal }
84
+ else { SubmitInternal }
85
+ }
83
86
commands.toList ::: initState
84
87
}
85
88
@@ -104,24 +107,24 @@ object SubmitDependencyGraph {
104
107
" Content-Type" -> " application/json" ,
105
108
" Authorization" -> s " token ${githubToken()}"
106
109
)
107
- state.log.info(s " Submiting dependency snapshot of job ${snapshot.job} to $snapshotUrl" )
108
- val result = for {
109
- httpResp <- Try (Await .result(http.processFull(request), Duration .Inf ))
110
- snapshot <- getSnapshot(httpResp)
111
- } yield {
112
- state.log.info(s " Submitted successfully as $snapshotUrl/ ${snapshot.id}" )
113
- setGithubOutputs(
114
- " submission-id" -> s " ${snapshot.id}" ,
115
- " submission-api-url" -> s " ${snapshotUrl}/ ${snapshot.id}" ,
116
- " snapshot-json-path" -> snapshotJsonFile.getAbsolutePath
117
- )
118
- state
119
- }
120
- result.get
121
- } else {
122
- state.log.info(s " Local mode: skipping submission " )
110
+ state.log.info(s " Submiting dependency snapshot of job ${snapshot.job} to $snapshotUrl" )
111
+ val result = for {
112
+ httpResp <- Try (Await .result(http.processFull(request), Duration .Inf ))
113
+ snapshot <- getSnapshot(httpResp)
114
+ } yield {
115
+ state.log.info(s " Submitted successfully as $snapshotUrl/ ${snapshot.id}" )
116
+ setGithubOutputs(
117
+ " submission-id" -> s " ${snapshot.id}" ,
118
+ " submission-api-url" -> s " ${snapshotUrl}/ ${snapshot.id}" ,
119
+ " snapshot-json-path" -> snapshotJsonFile.getAbsolutePath
120
+ )
123
121
state
124
122
}
123
+ result.get
124
+ } else {
125
+ state.log.info(s " Local mode: skipping submission " )
126
+ state
127
+ }
125
128
126
129
}
127
130
@@ -200,7 +203,7 @@ object SubmitDependencyGraph {
200
203
private def githubToken (local : Boolean = false ): String = githubCIEnv(" GITHUB_TOKEN" , local)
201
204
private def githubOutput (local : Boolean = false ): String = githubCIEnv(" GITHUB_OUTPUT" , local)
202
205
203
- private def githubCIEnv (name : String , local : Boolean = false ): String =
206
+ private def githubCIEnv (name : String , local : Boolean = false ): String =
204
207
Properties .envOrNone(name).getOrElse {
205
208
if (local) " "
206
209
else throw new MessageOnlyException (s " Missing environment variable $name. This task must run in a Github Action. " )
0 commit comments