mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-10 00:43:15 -06:00
Compare commits
1 commit
5eba4c2604
...
3fbfd0a057
Author | SHA1 | Date | |
---|---|---|---|
3fbfd0a057 |
2 changed files with 4 additions and 2 deletions
|
@ -13,13 +13,14 @@ import (
|
||||||
var ciCmd = &cobra.Command{
|
var ciCmd = &cobra.Command{
|
||||||
Use: "ci",
|
Use: "ci",
|
||||||
Short: "offload build to GHA",
|
Short: "offload build to GHA",
|
||||||
|
Args: cobra.ExactArgs(1),
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
inputs := make(map[string]interface{})
|
inputs := make(map[string]interface{})
|
||||||
if includeLock {
|
if includeLock {
|
||||||
log.Debug("including lock file in inputs")
|
log.Debug("including lock file in inputs")
|
||||||
inputs["lockFile"] = readLockFile()
|
inputs["lockFile"] = readLockFile()
|
||||||
}
|
}
|
||||||
github.CreateDispatch("build.yml", ref, inputs)
|
github.CreateDispatch(args[0], ref, inputs)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,6 +165,7 @@ func ReadMarkdownFromZip(zipData []byte, fileName string) (string, error) {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
func CreateDispatch(workflowFileName string, ref string, inputs map[string]interface{}) {
|
func CreateDispatch(workflowFileName string, ref string, inputs map[string]interface{}) {
|
||||||
|
log.Infof("creating dispatch event for %s", workflowFileName)
|
||||||
event := github.CreateWorkflowDispatchEventRequest{Ref: ref, Inputs: inputs}
|
event := github.CreateWorkflowDispatchEventRequest{Ref: ref, Inputs: inputs}
|
||||||
_, err := client.Actions.CreateWorkflowDispatchEventByFileName(
|
_, err := client.Actions.CreateWorkflowDispatchEventByFileName(
|
||||||
context.Background(),
|
context.Background(),
|
||||||
|
|
Loading…
Reference in a new issue