Skip to content

Commit

Permalink
Add workflow call event to support reusable workflows (#65)
Browse files Browse the repository at this point in the history
Co-authored-by: Alvin Tang <[email protected]>
  • Loading branch information
alvintang and alvinBellroy authored Aug 31, 2023
1 parent ae466c5 commit 51f7d23
Show file tree
Hide file tree
Showing 15 changed files with 57 additions and 7 deletions.
11 changes: 10 additions & 1 deletion defaults.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
sha256:0181093d1c7e4727d61088f8eea1e3c76646874d5797a38a8d5c1a209b4c707d
, On =
./defaults/On.dhall
sha256:6f6f148bc2ba6ccf417bd97abd1416c6948a3540c3f49d078a8a2a9178a56931
sha256:b474f7529609724e1777a5e75a997e8361ac2b237787ae2020d63a4b210a396d
, Step =
./defaults/Step.dhall
sha256:fc31ac861cbf0231429dc5d94bf8a1f905fcdf6ec108e376c5c82b60d9ddf5c0
Expand Down Expand Up @@ -31,9 +31,18 @@
, Input =
./defaults/Input.dhall
sha256:047d951f9f951543458f7dd6ceffb5d53585fe2d59ff2a1616e8f4e130615f1a
, Output =
./defaults/Output.dhall
sha256:15e5b80617e8fe293b16c2698712ac767dc1690ff74f28b174539cc664caa3dd
, Secret =
./defaults/Secret.dhall
sha256:a810bcbb4fa7a5bca45fcc87a896cde15bf619256f7de3eed52a95ec48ffa04e
, RepositoryDispatch =
./defaults/events/RepositoryDispatch.dhall
sha256:9adb6b3b154d4f1df647c43579e37be36ac9bbb7848cdba159863220ec52bb9f
, WorkflowCall =
./defaults/events/WorkflowCall.dhall
sha256:8f27a30a5568ea13c7140f149d4c0087d4dad17baa4deaba1580f1dac6f983ed
, WorkflowDispatch =
./defaults/events/WorkflowDispatch.dhall
sha256:2133dc321eb5b06cd0c9ffb6cd412fa1dfd7e20c4341fecbff2b17ce29119958
Expand Down
3 changes: 3 additions & 0 deletions defaults/On.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ let Schedule = ../types/events/Schedule.dhall

let RepositoryDispatch = ../types/events/RepositoryDispatch.dhall

let WorkflowCall = ../types/events/WorkflowCall.dhall

let WorkflowDispatch = ../types/events/WorkflowDispatch.dhall

let WorkflowRun = ../types/events/WorkflowRun.dhall
Expand All @@ -27,6 +29,7 @@ in { push = None Push
, delete = None Delete
, schedule = None (List Schedule)
, repository_dispatch = None RepositoryDispatch
, workflow_call = None WorkflowCall
, workflow_dispatch = None WorkflowDispatch
, workflow_run = None WorkflowRun
, release = None Release
Expand Down
1 change: 1 addition & 0 deletions defaults/Output.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ description = None Text, value = "" }
1 change: 1 addition & 0 deletions defaults/Secret.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ description = None Text, required = False }
4 changes: 4 additions & 0 deletions defaults/events/WorkflowCall.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{ inputs = None (List { mapKey : Text, mapValue : ../../types/Input.dhall })
, outputs = None (List { mapKey : Text, mapValue : ../../types/Output.dhall })
, secrets = None (List { mapKey : Text, mapValue : ../../types/Secret.dhall })
}
4 changes: 2 additions & 2 deletions package.dhall
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
./schemas.dhall
sha256:970a322042b34ee62b52def05a16d73b157784aa266ba4d2f79b2b74916aadc2
sha256:43807892a93fec194be724bb594c3d9357ac8e5a51b6fe62a5ca7e1c1966a0d0
/\ { steps =
./steps.dhall
sha256:eba32baba369939e7fb57923fe1b60cea0d38fcc5531acf966561397e0613d41
}
/\ { types =
./types.dhall
sha256:cff9bb6620cee70dd2a399a3afdd744233cb1aca3456bf958de2168c801c3952
sha256:8cdc2ea1ab3635a9600e0b4662bec06fa169ace943b415fa3ad88e4d7b00366d
}
13 changes: 11 additions & 2 deletions schemas.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
sha256:9ccec904643ade1050323d9ce5da865a3ad8c764a7cbc0f3c397717b1a0ece74
, On =
./schemas/On.dhall
sha256:42660d82efbe87a2d242af47563c0fb8eb21e311e468c073e15a4fad12a86fac
sha256:0af282ef00602c88754869aeffd22ea9cd451f6ee48a3b3127330ea695c12b8c
, RunsOn =
./schemas/RunsOn.dhall
sha256:86f5d1f0c5dc24b2033237a9194f70b14326d6bae031bd44a0630e45dd3a4b3a
Expand All @@ -21,7 +21,7 @@
sha256:ccf7857f3b39aba24ae09b6eb2b430c96be6b3bc697ed6f0bae464e1e7bdff82
, Workflow =
./schemas/Workflow.dhall
sha256:f74c105417f1b46ddeb4f82ac49bff49af7d7a0ec056a5c54f890561eaed278f
sha256:c5a60208a62b4492a4fa48eb2430847ddd3c796392fd8db71327dbb15b8e6484
, Push =
./schemas/events/Push.dhall
sha256:42b2efddec698fbb36321e738286478b35dfd9420ce10798659237570db55024
Expand All @@ -43,9 +43,18 @@
, Input =
./schemas/Input.dhall
sha256:f15ab36ac38cb32a757173088ec95050e3cb3fe8765bd1d4cc49851cec7877d8
, Output =
./schemas/Output.dhall
sha256:f01b31455186c9ecf937b48023d9408a7d5bf5db3fc4964b6060a43e1c4dabe8
, Secret =
./schemas/Secret.dhall
sha256:a58fd6ad314edcd6800e283206de83e76cb0b3d56998570b1f5482a2d8f4a56f
, RepositoryDispatch =
./schemas/events/RepositoryDispatch.dhall
sha256:53256e908fe5eb196af560db2c337b6cbc35c2eee48d6d459714554c8f777c9d
, WorkflowCall =
./schemas/events/WorkflowCall.dhall
sha256:cafacd2c02714f9e00ad420661a13bf80bab0921f99601ff38338e6eaefc1ad9
, WorkflowDispatch =
./schemas/events/WorkflowDispatch.dhall
sha256:f3243d9aaa461034e9844d51fb4e2c646a956ea3df2d1f12ae31e16ee29b1a55
Expand Down
1 change: 1 addition & 0 deletions schemas/Output.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ Type = ../types/Output.dhall, default = ../defaults/Output.dhall }
1 change: 1 addition & 0 deletions schemas/Secret.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ Type = ../types/Secret.dhall, default = ../defaults/Secret.dhall }
3 changes: 3 additions & 0 deletions schemas/events/WorkflowCall.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{ Type = ../../types/events/WorkflowCall.dhall
, default = ../../defaults/events/WorkflowCall.dhall
}
13 changes: 11 additions & 2 deletions types.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
sha256:060bf27380c527f136c2c86ba1cf1f7cab6ad3dd339e655db0873cc8068b7b9d
, On =
./types/On.dhall
sha256:3a696cd39ca6ad5e7eac08417a3f0d4bdf9a8727ac36e498e4fb4ea8838463b9
sha256:68a98e0cb41efa862449ed10acab3b0c97d4f6527f490c1a3137f92148202ac1
, Step =
./types/Step.dhall
sha256:c2efe65fd3b819521612000af9ebee52e7a74cce4c37de891dcdc7d6c25169fa
Expand All @@ -27,7 +27,7 @@
sha256:c957b80c6a0d53dce7bf05921c1983797b5d52958ded76244cd94ae80deb94e5
, Workflow =
./types/Workflow.dhall
sha256:595cf0613a9c80866648489ac6ec26c6d3abe933aa38a975e854bada556314b3
sha256:89fd0b124a615700c13c44408dc5178a9d126b23c84efae6e554aaf60286f451
, Push =
./types/events/Push.dhall
sha256:5147b1dd6eca94aae5d217b979cac20ba64b7ec160488dd917f171cae451b135
Expand Down Expand Up @@ -61,9 +61,18 @@
, Input =
./types/Input.dhall
sha256:4723eaffcfb407926dbda34ad46b0e4159885063a24aa26351fd86417a150c4a
, Output =
./types/Output.dhall
sha256:4c7baccef8bd151904013c18b9cb539944019e8d85c2cb53c89d01988cde052c
, Secret =
./types/Secret.dhall
sha256:8db70cb6694b1748740dd506ebb8e35af3baa01cf3e1b7883dbac2637703c081
, RepositoryDispatch =
./types/events/RepositoryDispatch.dhall
sha256:f7a1d37a7fa9ce33f736813d132503dcf9c46a3fc72c7327c07d799af9f6ea63
, WorkflowCall =
./types/events/WorkflowCall.dhall
sha256:8fa0371a0e0618210d7ac34213b516c726194410055879eafc8f8e2523ba6a8a
, WorkflowDispatch =
./types/events/WorkflowDispatch.dhall
sha256:6a5553c84dd7397eb24b3f94326d9ae9cfae04ace8fa55606319ee312d023ef8
Expand Down
3 changes: 3 additions & 0 deletions types/On.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ let Schedule = ./events/Schedule.dhall

let RepositoryDispatch = ./events/RepositoryDispatch.dhall

let WorkflowCall = ./events/WorkflowCall.dhall

let WorkflowDispatch = ./events/WorkflowDispatch.dhall

let WorkflowRun = ./events/WorkflowRun.dhall
Expand All @@ -27,6 +29,7 @@ in { push : Optional Push
, delete : Optional Delete
, schedule : Optional (List Schedule)
, repository_dispatch : Optional RepositoryDispatch
, workflow_call : Optional WorkflowCall
, workflow_dispatch : Optional WorkflowDispatch
, workflow_run : Optional WorkflowRun
, release : Optional Release
Expand Down
1 change: 1 addition & 0 deletions types/Output.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ description : Optional Text, value : Text }
1 change: 1 addition & 0 deletions types/Secret.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ description : Optional Text, required : Bool }
4 changes: 4 additions & 0 deletions types/events/WorkflowCall.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{ inputs : Optional (List { mapKey : Text, mapValue : ../Input.dhall })
, outputs : Optional (List { mapKey : Text, mapValue : ../Output.dhall })
, secrets : Optional (List { mapKey : Text, mapValue : ../Secret.dhall })
}

0 comments on commit 51f7d23

Please sign in to comment.