| name | github-actions-logs |
| description | Retrieve and analyze GitHub Actions CI/CD logs. Use when the user provides a GitHub Actions run URL (e.g. https://github.com/OWNER/REPO/actions/runs/RUN_ID) and needs to diagnose CI failures, view raw logs, or summarize build results. Works with or without the raw logs direct URL.
|
GitHub Actions Log Retrieval Skill
When to Use
The user provides one of:
- A GitHub Actions run URL:
https://github.com/OWNER/REPO/actions/runs/RUN_ID
- A GitHub Actions job URL:
https://github.com/OWNER/REPO/actions/runs/RUN_ID/job/JOB_ID
- A raw logs blob URL (signed SAS URL from
productionresultssa7.blob.core.windows.net)
Prerequisites
Retrieval Methods
Method 1: gh CLI (Preferred)
Extract OWNER/REPO and RUN_ID from the URL, then:
gh api repos/{OWNER}/{REPO}/actions/runs/{RUN_ID}/jobs?per_page=100 | \
python3 -c "
import json, sys
data = json.load(sys.stdin)
for job in data.get('jobs', []):
print(f\"Job: {job['name']} | Status: {job['conclusion']} | ID: {job['id']}\")
for step in job.get('steps', []):
print(f\" Step: {step['name']} | Status: {step['conclusion']}\")
"
gh api repos/{OWNER}/{REPO}/actions/jobs/{JOB_ID}/logs
gh api repos/{OWNER}/{REPO}/actions/jobs/{JOB_ID}/logs 2>&1 | grep -A5 "error:"
Important: gh run view --log-failed only works when the run is completed.
If the run is still in progress, it will say "logs will be available when it is complete".
In that case, use gh api .../actions/jobs/{JOB_ID}/logs instead — this works even
for in-progress or recently completed runs.
Method 2: Raw Logs URL (Direct Blob)
If the user provides a productionresultssa7.blob.core.windows.net URL:
https://productionresultssa7.blob.core.windows.net/actions-results/{GUID}/workflow-job-run-{JOB_RUN_GUID}/logs/job/job-logs.txt?{SAS_PARAMS}
- These URLs are time-limited signed URLs (SAS tokens). They expire after ~1 hour.
- Use
fetch_webpage tool to retrieve content, or curl in terminal:
curl -sL "RAW_LOGS_URL"
- If expired, fall back to Method 1.
Method 3: GitHub API (No gh CLI)
If gh is not available, use curl directly:
curl -sL "https://api.github.com/repos/{OWNER}/{REPO}/actions/runs/{RUN_ID}/jobs" | python3 -c "..."
curl -sL -H "Authorization: token ${GH_TOKEN}" \
"https://api.github.com/repos/{OWNER}/{REPO}/actions/jobs/{JOB_ID}/logs"
Method 4: Web Page Scraping (Last Resort)
Use fetch_webpage on the Actions page URL. GitHub requires sign-in for full logs,
but annotations (error/warning summaries) are visible on public repos without login.
URL Parsing Guide
| URL Pattern | Extract |
|---|
github.com/OWNER/REPO/actions/runs/RUN_ID | OWNER, REPO, RUN_ID |
github.com/OWNER/REPO/actions/runs/RUN_ID/job/JOB_ID | + JOB_ID |
productionresultssa7.blob.core.windows.net/actions-results/GUID/... | Direct blob (SAS) |
Common CI Failure Patterns
After retrieving logs, look for:
##[error] — GitHub Actions error markers
error: — compiler/clang-tidy errors
fatal: — git or build fatal errors
FAILED — test or build failures
not found — missing dependencies
Process completed with exit code 1 — step failure boundary
Example Workflow
- User gives:
https://github.com/foo/bar/actions/runs/12345/job/67890
- Parse:
OWNER=foo, REPO=bar, RUN_ID=12345, JOB_ID=67890
- Run:
gh api repos/foo/bar/actions/jobs/67890/logs 2>&1 | tail -80
- Analyze the error output and report findings to the user