October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

How to Track Every GitHub Actions Workflow Attempt

Pair each workflow run ID with its attempt number, retrieve that attempt’s jobs, and store a separate, updateable record for every rerun.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the workflow run’s run_id to identify the run and pair it with run_attempt—called attempt_number in the jobs API—to distinguish each rerun. For a durable history, save one ledger record per attempt and capture that attempt’s jobs through GitHub’s attempt-specific REST endpoint.

Identify each attempt, not just the workflow run

A workflow run can have multiple attempts. GitHub’s workflow-run REST API assigns the run its run_id; the Actions context exposes github.run_attempt as the attempt number for that run. When requesting jobs through the REST API, the corresponding parameter is named attempt_number.

As an Amazon Associate I earn from qualifying purchases.

For an external ledger, use the repository identity, run_id, and attempt number together as a recommended key. The repository component scopes the record; the run ID groups attempts under the same workflow run; and the attempt number keeps reruns from overwriting one another. GitHub documents these identifiers, but does not prescribe this ledger schema.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

See GitHub’s GitHub context reference and the workflow runs REST API.

Retrieve jobs for a specific attempt

Use the workflow-jobs endpoint with both the workflow run ID and the attempt number. This retrieves jobs for the chosen attempt rather than treating the run as one undifferentiated result. GitHub documents the endpoint in its workflow jobs REST API; access requires Actions repository read permission and is subject to repository visibility and authentication requirements.

Record a snapshot of each job’s identity, status or conclusion, and timestamps alongside the attempt. Job state can change while a workflow is running, so update the attempt record as it progresses and preserve its final observed state.

Choose what the ledger retains

GitHub provides the identifiers and API surfaces, not a required external-ledger format or a guarantee about how an external system captures attempts. The following fields make a practical record; treat them as implementation choices rather than GitHub-mandated fields.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Record level Useful fields Why retain them
Attempt Repository identity, run_id, attempt number, workflow name and file when available Identifies the attempt and connects it to its parent run.
Execution context Event, branch or ref, head SHA Shows what triggered the run and which source revision it used.
Outcome and timing Status, conclusion, start time, completion time Distinguishes an in-progress record from a completed outcome and supports later review.
Actors Original triggering actor; rerun requester when available Keeps the person who triggered the original run separate from the person who requested a rerun.
Jobs Per-job identity, status or conclusion, timestamps Preserves the attempt’s job-level results, not just its overall outcome.

Make writes idempotent on the attempt key so that repeated collection updates the same attempt instead of creating duplicates. Keep a record while the attempt is in progress, then update it as it reaches a terminal state. These are recommended ledger behaviors, not guarantees supplied by GitHub.

Account for rerun behavior and limits

GitHub allows a workflow run, failed jobs, or selected jobs to be rerun within 30 days of the initial run. A workflow run can be rerun at most 50 times, counting full reruns and reruns of a subset of jobs. These are operational limits stated in GitHub’s rerun guide.

A rerun is not necessarily a run against the latest commit. GitHub retains the original event’s GITHUB_SHA and GITHUB_REF. Store the SHA and ref with each attempt so readers can distinguish a rerun of the original revision from a new workflow run triggered by later code.

Privileges also follow the original trigger, not the person requesting the rerun. GitHub states: “Re-runs use the privileges of the actor who initially triggered the workflow, not the privileges of the actor who initiated the re-run.” If your ledger tracks actors, do not collapse those roles into one field.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Automate reruns carefully

The rerun REST operations target a workflow run by run_id. GitHub documents Actions repository write permission for rerun endpoints and a successful response status of 201. Before attempting one programmatically, verify the caller’s permission and that the run remains within GitHub’s rerun window and limit. Consult the live workflow runs REST API reference for endpoint details, authentication requirements, and the current API version.

Review prior attempts in GitHub

For a manual check, open the workflow run page and use its “Latest” dropdown to select a previous attempt. That is useful for inspection, but a separately stored attempt ledger is the more direct way to retain a structured history for later reporting or export.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.