← Back to list

.yml vs .yaml: The Truth Behind the Extensions – My CI Setup Journey

Ever had that tiny moment of confusion while setting up a project’s CI workflow? I sure did. As an undergraduate diving into practical…

Nipun Lakmal · 2025-08-08 07:45 · 10 claps · 1.9 min read
#yml #yaml #difference #workflow
Open on Medium ↗

.yml vs .yaml: The Truth Behind the Extensions – My CI Setup Journey

Ever had that tiny moment of confusion while setting up a project’s CI workflow? I sure did. As an undergraduate diving into practical DevOps with a Next.js project, I stumbled headfirst into a classic debate: should my workflow config file end with .yml or .yaml? Let’s break it down in simple terms, with real-world examples and shortcuts. So you never waste time over this again!

What’s the Deal with .yml and .yaml?

At first glance, they both look like “just file extensions for YAML files,” but which is correct? Why do some guides use .yml and others .yaml? Do they work the same? Spoiler: Yes! Here’s exactly what I learned.

The Root of the Confusion

  • Early computers = short extensions

Older systems like MS-DOS only let you have three letters for file extensions, so .yml became the go-to choice.

  • Modern practice = full extension

As tech evolved, .yaml became possible (and matches the language name: “YAML Ain’t Markup Language”)

My CI Setup

While creating a Next.js project’s CI (workflow for automated testing and builds), I followed some GitHub documentation.

  • Some examples had main.yml
  • Others wrote workflow.yaml

This got me wondering: Will my project break if I use the wrong one?

(Good news: it works either way!)

Tools like GitHub Actions, Kubernetes, and Docker Compose all happily use either extension — you just need the correct content inside.

The Official Answer

There’s no technical difference.

  • .yml and .yaml files are parsed exactly the same way.
  • The only “difference” is in spelling.

Why do people care?

  • The official YAML spec now prefers .yaml, just to match the language name.
  • Legacy tools and older guides still use .yml.

Shortcut: Save Time On Day One

  • Don’t overthink! Use .yaml for new projects—almost everyone does now.
  • If your team/project uses .yml, stick with that for consistency.
  • You can always rename files later; just make sure your references match.

Final Thoughts: Why Waste Time?

When you’re setting up CI workflows (or any YAML-based config), don’t sweat the extension. I spent a few minutes figuring all this out so you won’t have to.

The real key is writing valid YAML in your file — be it .yml or .yaml.

“.yml” and “.yaml” are exactly the same in function. Use .yaml for new stuff, .yml for old stuff, and always stay consistent, then get back to coding!

Hope this saves you some time next time you set up a workflow or config. Drop a comment if you’ve tripped over this too, or if you have other config mysteries worth exploring!


메타데이터
post_id
9e811562d79e
slug
yml-vs-yaml-the-truth-behind-the-extensions-my-ci-setup-journey-9e811562d79e
url
https://medium.com/@nipun-munasinghe/yml-vs-yaml-the-truth-behind-the-extensions-my-ci-setup-journey-9e811562d79e
canonical_url
https://medium.com/@nipun-munasinghe/yml-vs-yaml-the-truth-behind-the-extensions-my-ci-setup-journey-9e811562d79e
author_url
https://medium.com/@nipun-munasinghe
status
ok
fetched_at
2026-06-25 07:00:49