Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 756 Bytes

File metadata and controls

43 lines (28 loc) · 756 Bytes

gh CLI Cheat Sheet

Check Workflow Status

To check the status of the last run for a specific workflow, use the following command:

gh run list --workflow=<workflow_file_name> --limit=1

Example for web.yml:

gh run list --workflow=web.yml --limit=1

Cancel a Workflow Run

To cancel a running workflow, you first need to get the RUN_ID of the job.

  1. List running jobs to find the RUN_ID:

    gh run list --workflow=<workflow_file_name>

    Example for kmp.yml:

    gh run list --workflow=kmp.yml
  2. Cancel the run using the RUN_ID:

    gh run cancel <RUN_ID>

    Example:

    gh run cancel 123456789