iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
To keep a dependable record of GitHub Actions reruns, treat each attempt as a separate ledger entry under its workflow run. Use the repository identity, run_id, and run_attempt as a practical deduplication key; then retrieve that attempt’s jobs with GitHub’s attempt-specific jobs endpoint. GitHub identifies the run and its attempts, but does not define or guarantee an external ledger schema or capture process.
What identifies a workflow run versus a rerun?
A workflow run and its attempts are different levels of identity. GitHub’s workflow-run REST API uses run_id to identify the workflow run. The Actions context reference defines github.run_attempt as the unique attempt number for that run in the repository. The workflow-jobs API uses the equivalent parameter name attempt_number to retrieve jobs for a particular attempt.
For an external ledger, use a composite key such as repository identity + run_id + run_attempt. This is an implementation recommendation derived from GitHub’s documented fields, not a GitHub-defined schema. It preserves the parent run relationship while preventing multiple attempts from overwriting one another. See GitHub’s Actions contexts reference, the workflow-runs REST API, and the workflow-jobs REST API.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →How do you retrieve jobs for a specific attempt?
Use the workflow-jobs REST endpoint for a workflow run and supply both its run_id and the attempt number. This matters when a run has been rerun: querying only the run does not express which attempt’s job results you want to retain. Readers need Actions repository read permission, with authentication and repository visibility requirements applying.
#1 Best Overall
The run page also lets you inspect an earlier attempt using the “Latest” dropdown. That is useful for manual review, but a ledger intended to retain historical results should persist the attempt-specific response rather than depend on what someone can later select in the interface. GitHub’s rerun guide describes the run-page control; endpoint details and permissions are in the workflow-jobs API reference.
What should an attempt ledger store?
GitHub’s documentation establishes identifiers, rerun behavior, and how to retrieve attempt-specific jobs; it does not mandate the fields below. A useful ledger stores enough context to interpret a result later and distinguish a rerun from a new run on a different commit.
Rank #2
- Attempt identity: repository identity,
run_id, andrun_attempt(or APIattempt_number). - Workflow context: workflow name and file where available, triggering event, branch or ref, and head SHA.
- Run outcome: status, conclusion, start time, and completion time.
- Actor details: original triggering actor and rerun requester in separate fields when available.
- Job snapshot: each job’s identity, status or conclusion, and timestamps for the selected attempt.
Retain the original SHA and ref with each attempt. GitHub says reruns use the original event’s GITHUB_SHA and GITHUB_REF; they do not mean the workflow ran again against a newer commit.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
How can you capture attempts without overwriting history?
Make writes idempotent on the composite attempt key: receiving the same attempt data again should update that record rather than create a duplicate. If the system observes a run while it is in progress, update its status and job snapshots as it progresses, then record the terminal outcome and completion time. This approach preserves both an in-progress view and the final result; it is a ledger design choice, not a capture guarantee provided by GitHub.
- Observe the run: record the repository,
run_id, attempt number, workflow context, original actor, SHA, and ref. - Fetch attempt jobs: request jobs using the run ID and that attempt’s
attempt_number; save job identities, statuses or conclusions, and timestamps. - Upsert the entry: write by the composite key, updating mutable status fields rather than creating a second entry for the same attempt.
- Finalize and retain: save the completed run and job results as a snapshot according to your own retention and export requirements.
GitHub’s cited documentation does not prescribe how to capture every attempt in an external system. Your implementation must choose an observation mechanism and validate that it sees the attempts relevant to your workflow; do not treat the documented identifiers as a promise of automatic delivery.
What constraints apply when rerunning workflows?
GitHub documents reruns as available up to 30 days after the initial run. A workflow run may be rerun at most 50 times, counting both full reruns and reruns of a subset of jobs. Programmatic rerun operations use the workflow run_id; GitHub documents Actions repository write permission for those endpoints and a successful response status of 201. Check the live workflow-runs API reference for current endpoint and permission details.
Do not attribute the rerun’s permissions to the person who clicked 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.” Store those two actor roles separately when the data is available. The same rerun also retains the original event’s SHA and ref, so preserve them rather than substituting the repository’s current branch tip.
Recommended Free Tools
Which ledger decisions are yours to make?
GitHub provides attempt identifiers and retrieval surfaces, not an official external ledger format. Decide explicitly whether to record only completed attempts or also in-progress ones, how much detail to retain per job, how to handle changing status, how to distinguish the original actor from a rerun requester, and how long to retain or export snapshots. Those choices determine whether the ledger is merely an audit trail or can also support later troubleshooting and reconstruction of what was observed.
Best Value
REST API behavior, permissions, and API versions can change. Confirm the current GitHub documentation and API version when implementing.
Quick Recap
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.

