Skip to content

Trigger Github Actions workflow #1725

@passsy

Description

@passsy

Describe the feature or problem you’d like to solve

It's not possible to trigger Github Actions from the CLI. This would drastically improve how I manually trigger release workflows.

Documentation GitHub Actions: Manual triggers with workflow_dispatch

It is already possible to do this from the website, so it should be possible from the CLI

Proposed solution

Add gh workflow run <workflow name> -b <branch> which starts of workflows registered with trigger workflow_displatch for a specific branch

Workflows may have custom-defined inputs. It must be possible to specify those as well but I'm not aware of an elegant CLI api. One solution is -Parg1=foo -Parg2=bar as used by gradle.

on: 
  workflow_dispatch:
    inputs:
      logLevel:
        description: 'Log level'     
        required: true
        default: 'warning'
      tags:
        description: 'Test scenario tags'  

Additional context

86147571-2de93700-babf-11ea-8a08-e4beffd3abe9

Metadata

Metadata

Assignees

No one assigned

    Labels

    actionscoreThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions