diff --git a/pkgs/oizys/cmd/ci.go b/pkgs/oizys/cmd/ci.go index 8da5364..d6dbf10 100644 --- a/pkgs/oizys/cmd/ci.go +++ b/pkgs/oizys/cmd/ci.go @@ -13,13 +13,14 @@ import ( var ciCmd = &cobra.Command{ Use: "ci", Short: "offload build to GHA", + Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { inputs := make(map[string]interface{}) if includeLock { log.Debug("including lock file in inputs") inputs["lockFile"] = readLockFile() } - github.CreateDispatch("build.yml", ref, inputs) + github.CreateDispatch(args[0], ref, inputs) }, } diff --git a/pkgs/oizys/internal/github/main.go b/pkgs/oizys/internal/github/main.go index 8216766..d4803a9 100644 --- a/pkgs/oizys/internal/github/main.go +++ b/pkgs/oizys/internal/github/main.go @@ -61,7 +61,7 @@ func GetArtifacts(runID int64) (*github.ArtifactList, *github.Response) { } func GetUpdateSummaryArtifact(runID int64, host string) *github.Artifact { - artifactName := fmt.Sprintf("%s-summary", host) + artifactName := fmt.Sprintf("%s-summary", host) artifactList, _ := GetArtifacts(runID) for _, artifact := range artifactList.Artifacts { if artifact.GetName() == artifactName { @@ -165,6 +165,7 @@ func ReadMarkdownFromZip(zipData []byte, fileName string) (string, error) { // } 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} _, err := client.Actions.CreateWorkflowDispatchEventByFileName( context.Background(),