mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CI: Add automation for github assets publishing (#59491)
* Add github.star # Conflicts: # .drone.star # .drone.yml * Make step depend on fetch images # Conflicts: # .drone.yml * artifacts -> path # Conflicts: # .drone.yml * Add github token # Conflicts: # .drone.yml * Fix custom path # Conflicts: # .drone.yml * Add case where path is absent # Conflicts: # .drone.yml * Add GH_REGISTRY secret # Conflicts: # .drone.yml
This commit is contained in:
committed by
GitHub
parent
583aafbbd8
commit
e9cf8fa751
@@ -238,9 +238,8 @@ func main() {
|
||||
Flags: []cli.Flag{
|
||||
&dryRunFlag,
|
||||
&cli.StringFlag{
|
||||
Name: "path",
|
||||
Required: true,
|
||||
Usage: "Path to the asset to be published",
|
||||
Name: "path",
|
||||
Usage: "Path to the asset to be published",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "repo",
|
||||
|
||||
@@ -114,6 +114,10 @@ func getPublishGithubFlags(ctx *cli.Context) (*publishGithubFlags, error) {
|
||||
name := strings.Split(fullRepo, "/")[1]
|
||||
create := ctx.Value("create").(bool)
|
||||
artifactPath := ctx.Value("path").(string)
|
||||
if artifactPath == "" {
|
||||
artifactPath = fmt.Sprintf("grafana-enterprise2-%s-amd64.img", metadata.GrafanaVersion)
|
||||
fmt.Printf("path argument is not provided, resolving to default %s...\n", artifactPath)
|
||||
}
|
||||
return &publishGithubFlags{
|
||||
artifactPath: artifactPath,
|
||||
create: create,
|
||||
|
||||
Reference in New Issue
Block a user