September 9th, 2024

Earthly: Like Docker for Builds

The Earthly GitHub repository documentation discusses managing workflows, including disabling certain PR workflows, using `paths-ignore`, evaluating affected files at the job level, and employing boolean inputs for child job execution.

Read original articleLink Icon
Earthly: Like Docker for Builds

The GitHub repository for Earthly includes documentation on its GitHub Actions configuration, highlighting strategies for managing workflows effectively. Certain pull request (PR) workflows have been disabled due to ongoing issues, with plans to restore them once resolved. The decision to skip specific workflows aims to save time, particularly for PRs that only modify non-critical files, such as documentation. GitHub supports defining filters to prevent workflows from triggering based on affected files using `paths-ignore`, but this can lead to complications with required checks, potentially leaving workflows in a pending state. A proposed solution involves evaluating affected files at the job level, allowing conditional execution of jobs and avoiding pending states when a job is not executed. The documentation also addresses complexities associated with reusable workflows, where skipping a parent job can inadvertently skip child jobs, resulting in similar pending issues. The final recommendation is to use a boolean input (`SKIP_JOB`) for child jobs to manage their execution independently of the parent job's status. Overall, the documentation provides valuable insights into optimizing GitHub Actions by selectively skipping workflows to enhance performance.

- Certain PR workflows are currently disabled to save time on non-critical changes.

- GitHub's `paths-ignore` feature can complicate required checks, leading to pending workflows.

- Evaluating affected files at the job level can prevent workflows from being stuck in pending states.

- Reusable workflows may skip child jobs if parent jobs are skipped, creating additional challenges.

- Using a boolean input for child jobs allows for independent execution control.

Link Icon 1 comments
By @SOLAR_FIELDS - 5 months
It will be interesting to see whether Earthly or something like Dagger wins out in the long run. They both fundamentally seek to solve similar problems with the same underlying technology (buildkit). It seems one approach (Earthly) is about keeping to a somewhat constrained golden path while allowing some better level of extensibility than a typical YAML based CI setup might. Whereas Dagger has gone all in on the extensibility route.