Get the latest tech news

Dear GitHub: no YAML anchors, please


Sep 22, 2025 Tags: programming, rant TL;DR: for a very long time, GitHub Actions lacked support for YAML anchors. This was a good thing.

In summary: YAML anchors further muddy the abstractions of workflows, jobs, and steps, by introducing a cross-cutting form of global state that doesn’t play by the rules of the rest of the system. It would only be fair to note that GitHub Actions already has some forms of non-locality: global contexts, scoping rules for env blocks, needs dependencies, step and job outputs, and so on. I personally find this syntax incredibly hard to read, but at least it has a unique use case that could be useful in GitHub Actions: composing multiple sets of environment variables together with clear precedence rules is manifestly useful.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of YAML anchors

YAML anchors

Photo of Dear GitHub

Dear GitHub