Skip to content

Add workflow_dispatch to examples #678

@MikeMcC399

Description

@MikeMcC399

This is a suggestion for a feature addition of workflow_dispatch to make it simpler to run example workflows at will and individually.

Current situation

Workflow examples in .github/workflows, with the exception of example-component-test.yml, are set up with:

on:
  push:
    branches:
      - 'master'
  pull_request:

If a user wishes to test one of these workflows individually, it is not easy to isolate the test from other tests running.

Pushing to master for test purposes makes the master branch diverge from the generally used one. Opening a pull request causes all workflows to run, not just the one of interest.

Suggestion

Add workflow_dispatch to each of the workflow examples in .github/workflows.

See https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow.

(Consider also aligning the event triggers and naming of example-component-test.yml to other workflows.)

Benefit

When workflow_dispatch is present in a workflow in the master branch, it is possible to checkout a test branch, make modifications, then run the workflow from the test branch. To do this the identically named workflows in the master (default) branch and the test branch must both have workflow_dispatch enabled.

This will be helpful when making contributions to the repository or for users who are testing for their own purposes.

Workaround

In a fork of the repository, change the default branch to something other than master, for example test. Add workflow_dispatch to any workflow in the test branch you would like to test. Run the action from the test branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions