Get Latest Workflow Status¶
Fetches and displays the latest GitHub Actions workflow run from the repository โ showing the run name, status, conclusion, branch, and a full job-by-job breakdown with each step's result. Useful for quickly checking CI status from the terminal without opening a browser.
Usage¶
Aliases¶
This command is available under several names (all invoke the same CLI):
get-latest-workflow-status(default)get-latest-workflowlatest-workflowwf-status
Options¶
| Flag | Type | Description |
|---|---|---|
--owner |
string |
GitHub repository owner (default: auto-detect from git remote or GH_OWNER env) |
--repo |
string |
GitHub repository name (default: auto-detect from git remote or GH_REPO env) |
--workflow |
string |
Filter by workflow filename (e.g. "test.yml") or numeric workflow ID |
--token |
string |
GitHub access token (overrides ACCESS_TOKEN / GITHUB_TOKEN / GH_TOKEN env vars) |
-h, --help |
boolean |
Show help message |
Environment Variables¶
| Variable | Description |
|---|---|
ACCESS_TOKEN / GITHUB_TOKEN / GH_TOKEN |
GitHub personal access token with actions:read scope (required) |
GH_OWNER |
Override repository owner (optional) |
GH_REPO |
Override repository name (optional) |
Examples¶
Show the latest workflow run for the current repository:
Show for a specific repository:
Filter by a specific workflow YAML file:
get-latest-workflow-status --workflow test.yml
get-latest-workflow-status --owner dimaslanjaka --repo bin --workflow deploy.yml
Show help:
Output Example¶
==============================
๐ Latest Workflow Run
==============================
Name : Node.js Package Test
Status : in_progress
Conclusion: null
Branch : master
Run ID : 26797771514
URL : https://github.com/dimaslanjaka/bin/actions/runs/26797771514
==============================
๐งฉ Jobs & Steps
==============================
๐งฑ Job: ๐จ Build, Pack & Test
Status: in_progress | Conclusion: null
โ
Set up job -> success (completed)
โ
โฌ๏ธ Checkout workflow repository -> success (completed)
โ
โฌ๏ธ Setup CI Environment -> success (completed)
โช ๐งช Run tests in test/example.test.cjs -> null (in_progress)
How it works¶
- Authenticate โ Uses
ACCESS_TOKEN/GITHUB_TOKEN/GH_TOKENto call the GitHub API. - Detect repository โ Owner and repo are auto-detected from the
git remote.origin.url, or can be overridden with--owner/--repoflags orGH_OWNER/GH_REPOenvironment variables. - Fetch latest run โ Calls
GET /repos/{owner}/{repo}/actions/runs?per_page=1to get the most recent workflow run. If--workflowis specified, appends&workflow_id=<name>to filter by workflow filename or ID. - Fetch jobs โ Calls
GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobsto retrieve all jobs and their steps. - Print report โ Renders a formatted terminal report with color-coded icons (โ success, โ failure, โญ๏ธ skipped, โช pending/in progress).
Source¶
See src/github-workflows/get-latest-workflow-status-cli.mjs.