Commit 7df0877
committed
Skip already passed jobs by checking previous attempt status via API
Add logic to detect whether a job has already succeeded in a previous
workflow attempt using the GitHub Actions API. This enables us to use
the "Rerun all jobs" button without re-running already successful jobs.
We currently report commit status manually in a parent workflow. If
"Rerun failed jobs" is used, GitHub postpones execution of the status
reporting step until all rerun jobs complete, leaving the UI stuck in
an outdated state.
To trigger status updates promptly, we must use "Rerun all jobs". With
this change, each job queries the previous attempt using the GitHub CLI
and exits early if it already succeeded, saving time and resources while
still updating commit status immediately.
Signed-off-by: Nikolay Martyanov <nikolay@zededa.com>1 parent b049c93 commit 7df0877
1 file changed
Lines changed: 210 additions & 22 deletions
0 commit comments