Manuelle Ausführung eines Workflows

When a workflow is configured to run on the workflow_dispatch event, you can run the workflow using the Actions tab on GitHub, GitHub CLI, or the REST API.

Note: GitHub-hosted runners are not currently supported on GitHub Enterprise Server. You can see more information about planned future support on the GitHub public roadmap.

Configuring a workflow to run manually

To run a workflow manually, the workflow must be configured to run on the workflow_dispatch event. To trigger the workflow_dispatch event, your workflow must be in the default branch. For more information about configuring the workflow_dispatch event, see "Events that trigger workflows".

Write access to the repository is required to perform these steps.

Running a workflow

  1. Navigiere in GitHub Enterprise Server zur Hauptseite des Repository.
  2. Klicke unter Deinem Repository-Namen auf Actions (Aktionen). Registerkarte „Actions" (Aktionen) auf der Navigationsleiste des Haupt-Repository
  3. Klicken Sie in der linken Seitenleiste auf den Workflow, den Sie ausführen möchten. Aktionen auswählen Workflow
  4. Wählen Sie über der Liste der Workflowausführungen Workflow ausführen. Aktionsworkflow-Dispatch
  5. Use the Branch dropdown to select the workflow's branch, and type the input parameters. Klicken Sie auf Workflow ausführen. Aktionen manuell ausgeführt Workflow

To learn more about GitHub CLI, see "About GitHub CLI."

To run a workflow, use the workflow run subcommand. Replace the workflow parameter with either the name, ID, or file name of the workflow you want to run. For example, "Link Checker", 1234567, or "link-check-test.yml". If you don't specify a workflow, GitHub CLI returns an interactive menu for you to choose a workflow.

gh workflow run workflow

If your workflow accepts inputs, GitHub CLI will prompt you to enter them. Alternatively, you can use -f or -F to add an input in key=value format. Use -F to read from a file.

gh workflow run greet.yml -f name=mona -f greeting=hello -F data=@myfile.txt

You can also pass inputs as JSON by using standard input.

echo '{"name":"mona", "greeting":"hello"}' | gh workflow run greet.yml --json

To run a workflow on a branch other than the repository's default branch, use the --ref flag.

gh workflow run workflow --ref branch-name

To view the progress of the workflow run, use the run watch subcommand and select the run from the interactive list.

gh run watch

Running a workflow using the REST API

Wenn Sie die REST-API verwenden, konfigurieren Sie die eingaben und ref als Anforderungstextparameter. Wenn die Eingaben weggelassen werden, werden die in der Workflowdatei definierten Standardwerte verwendet.

Weitere Informationen zur Verwendung der REST-API finden Sie unter "Erstellen eines Workflow-Dispatch-Ereignisses."

Did this doc help you?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Oder, learn how to contribute.