Keeping GitHub Actions reruns in an attempt ledger
I built gha-rerun-ledger for a narrow task: inspect the attempts behind recent completed GitHub Actions runs, then keep enough metadata to replay the report offline. A workflow rerun can show successful jobs that carried over from an earlier attempt. Counting every row in every attempt would count that work more than once. The CLI walks attempts in order and assigns each job ID to its first…
The article discusses a GitHub Actions tool called gha-rerun-ledger, which aims to keep track of reruns and their associated attempts. The tool was built to inspect the attempts behind recent completed GitHub Actions runs, and to keep enough metadata to replay the report offline. The CLI walks through attempts in order and assigns each job ID to its first observed attempt.
If a later page returns that ID again, the report checks that the job name, execution owner, conclusion, timestamps, labels, and steps agree. The report separates viewed jobs from owned jobs, so a carried row stays visible without adding its elapsed interval twice. The article also mentions that every attempt receives a ledger row, including an empty attempt, and that the tool separates job time from step intervals, which are ranked separately and are not added to job time.
Additionally, the tool checks for failed-before-pass rows, which require a failure, timed_out, or startup_failure attempt followed by a successful attempt of the same run. The tool is MIT licensed and the code is available on GitHub.
Brief written by urgent.news from Dev.to's own syndicated text. Machine-written — may contain errors; check the original before relying on it.
This story
This is one outlet's version. Read the fullest account.