[Feature Request] YAML merge keys support #185877
Replies: 3 comments 1 reply
-
|
FWIW:
|
Beta Was this translation helpful? Give feedback.
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
This is a great write-up and a much-needed discussion. Since GitHub switched to the new parser and enabled anchors/aliases in 2025, the lack of merge keys (<<) has definitely become the "missing piece" for keeping GHA workflows DRY. While we wait for native support, have you considered using a pre-processor step in the meantime? Many teams are now using tools like yq or a simple Jsonnet/CUE setup to compile their "templated" YAMLs into standard GitHub-compatible YAML before pushing. Also, as you mentioned nektos/act adding support, it proves there is a clear demand for the local DX to match the cloud runner's capabilities. If GitHub won't build a custom resolver for the 1.2 parser, perhaps a "Compatibility Mode" flag in the workflow settings could be a middle ground? In the meantime, I’ll definitely upvote this. It’s the most logical next step after the 2025 anchor update. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Why are you starting this discussion?
Product Feedback
What GitHub Actions topic or product is this about?
General
Discussion Details
Context
It was suggested to create a new issue/discussion and I haven't come across one raised since for YAML merge keys support.
From the original 2021 YAML anchor + alias feature request (which opens with an example snippet using merge keys):
Related: YAML anchor + alias support:
Feature Request
In the YAML spec
1.2.0changelog (2009) merge keys was dropped:However, in the wild there are various YAML 1.2 compliant parsers which can be found to still have support for merge keys (treating it as an extension that is sometimes opt-in or always supported):
js-yaml)YS/yamlscriptis marked as officially supported by the YAML company)NOTE: Despite the YAML
1.2.0changelog regarding removal of the<<merge key operator, it had been communicated since about plans for explicit removal of the merge keys feature and apparently an RFC associated to that (now no longer present at the current iteration of the wiki unless going through revision history). As the main wiki page notes, the original team ran out of steam after the 20091.2.1spec release, and while activity did pick up again with the 20211.2.2spec release, progress seems to have stalled? (unclear if there will be a YAML 1.3, or what progress since1.2.2)Beta Was this translation helpful? Give feedback.
All reactions