'Re-run specific job in Github Actions

I see that it is possible to re-run github workflows from the UI, which is great. But is it also possible to re-run a specific job? let's say I have a pipeline with 2 jobs, one that builds my project and, the other one runs some tests, would it be possible to just re-run the tests without rebuilding the codebase?

Thanks for your answers :)



Solution 1:[1]

It's not possible for now, you can only re-run full pipeline.

Solution 2:[2]

Yes, it is possible since mid-March 2022 (2+ years later)

GitHub Actions: Re-run only failed or individual jobs

You can now re-run only failed jobs or an individual job in a GitHub Actions workflow run.

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, whe

Solution 3:[3]

The Apache NetBeans project had trouble re-running the individual workflow as well. Turned out the problem is in defining multiple independent workflows in a single file.

By splitting the single file into few we can now re-run each workflow independently.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sarah Abderemane
Solution 2 VonC
Solution 3 Jaroslav Tulach