Save Time with Partial Re-Runs in GitHub Actions

0
619

We have heard from you and we’re excited to announce that we have added the ability to re-run only the failed jobs or a single job in GitHub Actions. In addition, we have made navigation improvements that enable you to see the full results of previous runs.

Why would I want this?

GitHub Actions workflows are powerful tools, enabling you to automate a wide variety of software development processes. Our users build complex workflows that often rely on multiple jobs and dependencies. Features like job matrices can trigger multiple variant jobs with just a few lines of YAML. However, these workflows can take a while to run, so when a small part fails, it is frustrating to have to wait to run it again.

re-run failed jobs notification

By re-running only failed jobs—or even just a single job—you save time, skipping work that’s already been done. If you frequently use GitHub Actions, this can help you avoid concurrency limits and frees up your self-hosted runners for other jobs. As a bonus, if you use GitHub-hosted runners, you can save money by reducing billable minutes.

Ultimately, we want you to be able to iterate and ship software faster.

OK, how does it work?

If you have failing jobs in a workflow run, you’ll now see a new drop-down menu where you can choose “Re-run failed jobs” in addition to the existing “Re-run all jobs”. For a completed run, each job listed in the sidebar has a re-run icon when you hover over it. Jobs can also be re-run directly from the logs view.

re-reun this job icon

Additionally, when you initiate a partial re-run, you’ll see a confirmation dialog that lists all the jobs that will be re-run, including all jobs that are downstream dependencies.

Should you have more than one attempt at a workflow run, you’ll see a navigation drop-down to let you easily move between attempts. This is helpful for debugging what occurred across the various attempts of that run.

screenshot of menu option to move between attempts

Jobs from your new run appear in the UI alongside those that ran previously, giving you the full picture of what happened and letting you view all relevant job logs together. Only the minutes spent on jobs that were re-run are calculated towards your minutes of usage.

Let us know what you think

Partial re-runs are available via our REST API and our command-line tools. Please check out the documentation for more detail.

We want to hear how this works for you! Please leave any feedback in the Actions and Packages category in the GitHub Feedback repository.


LEAVE A REPLY

Please enter your comment!
Please enter your name here