@@ -21,12 +21,16 @@ sealed abstract class WorkflowJob extends Product with Serializable {
2121 def name : String
2222 def needs : List [String ]
2323 def outputs : Map [String , String ]
24+ def permissions : Option [Permissions ]
25+ def concurrency : Option [Concurrency ]
2426 // TODO: Check for other common properites, like `cond` and `need`
2527
2628 def withId (id : String ): WorkflowJob
2729 def withName (name : String ): WorkflowJob
2830 def withNeeds (needs : List [String ]): WorkflowJob
2931 def withOutputs (outputs : Map [String , String ]): WorkflowJob
32+ def withPermissions (permissions : Option [Permissions ]): WorkflowJob
33+ def withConcurrency (concurrency : Option [Concurrency ]): WorkflowJob
3034
3135 def updatedOutputs (name : String , value : String ): WorkflowJob
3236 def concatOutputs (outputs : TraversableOnce [(String , String )]): WorkflowJob
@@ -245,6 +249,8 @@ object WorkflowJob {
245249 def secrets : Option [Secrets ]
246250 def params : Map [String , String ]
247251 def outputs : Map [String , String ]
252+ def permissions : Option [Permissions ]
253+ def concurrency : Option [Concurrency ]
248254
249255 def withId (id : String ): Use
250256 def withName (name : String ): Use
@@ -253,6 +259,8 @@ object WorkflowJob {
253259 def withSecrets (secrets : Option [Secrets ]): Use
254260 def withParams (params : Map [String , String ]): Use
255261 def withOutputs (outputs : Map [String , String ]): Use
262+ def withPermissions (permissions : Option [Permissions ]): Use
263+ def withConcurrency (concurrency : Option [Concurrency ]): Use
256264
257265 def updatedParams (name : String , value : String ): Use
258266 def concatParams (params : TraversableOnce [(String , String )]): Use
@@ -267,15 +275,19 @@ object WorkflowJob {
267275 needs : List [String ] = List .empty,
268276 secrets : Option [Secrets ] = None ,
269277 params : Map [String , String ] = Map .empty,
270- outputs : Map [String , String ] = Map .empty
278+ outputs : Map [String , String ] = Map .empty,
279+ permissions : Option [Permissions ] = None ,
280+ concurrency : Option [Concurrency ] = None
271281 ): Use = new Impl (
272282 id = id,
273283 name = name,
274284 uses = uses,
275285 needs = needs,
276286 secrets = secrets,
277287 params = params,
278- outputs = outputs
288+ outputs = outputs,
289+ permissions = permissions,
290+ concurrency = concurrency
279291 )
280292 private final case class Impl (
281293 id : String ,
@@ -284,15 +296,23 @@ object WorkflowJob {
284296 needs : List [String ],
285297 secrets : Option [Secrets ],
286298 params : Map [String , String ],
287- outputs : Map [String , String ]
299+ outputs : Map [String , String ],
300+ permissions : Option [Permissions ],
301+ concurrency : Option [Concurrency ]
288302 ) extends Use {
303+ override def productPrefix = " Use"
304+
305+ // scalafmt: { maxColumn = 200 }
289306 override def withId (id : String ): Use = copy(id = id)
290307 override def withName (name : String ): Use = copy(name = name)
291308 override def withNeeds (needs : List [String ]): Use = copy(needs = needs)
292309 override def withUses (uses : String ): Use = copy(uses = uses)
293310 override def withSecrets (secrets : Option [Secrets ]): Use = copy(secrets = secrets)
294311 override def withParams (params : Map [String , String ]): Use = copy(params = params)
295312 override def withOutputs (outputs : Map [String , String ]): Use = copy(outputs = outputs)
313+ override def withPermissions (permissions : Option [Permissions ]): Use = copy(permissions = permissions)
314+ override def withConcurrency (concurrency : Option [Concurrency ]): Use = copy(concurrency = concurrency)
315+ // scalafmt: { maxColumn = 96 }
296316
297317 override def updatedParams (name : String , value : String ) =
298318 copy(params = params.updated(name, value))
0 commit comments