Composite Actions VS Reusable Workflows: What Are The Differences? (Check the new video below)

preview_player
Показать описание

What is the difference between Composite Actions and Reusable Workflows in GitHub Actions? I get this asked a lot, and today we are going to clarify this.

I’ve identified 6 main differences between those two GitHub Actions flavors, let’s discuss it.

🆘 NEED HELP? 🆘
We can talk about GitHub, Azure DevOps, or any other DevOps tool or project you need help with!

🙏🏻SUPPORT THE CHANNEL🙏🏻

🎥VIDEOS

💬JOIN THE COMMUNITY

❓QUESTIONS?
Have a question about DevOps, Cloud, Coding, or Anything Else? Post in comments section of this video!

_______________

🔮TOOLS I USE

📸🖥️GEAR AND SOFTWARE

Disclaimer:
Some product links are affiliate links which means if you buy something I'll receive a small commission at no additional cost to you.
As an Amazon Associate, I earn from qualifying purchases.
Рекомендации по теме
Комментарии
Автор

Thank you for this explanation; I'm currently cleaning up a few workflows and needed this information. In my experience, Github Actions seems like a very poorly implemented afterthought. So many parts, such as this composite action / workflow, are overly complicated and / or lacking in features and or flexibility. It really shouldn't have to be like this. Such a shame.

harryhalfmoon
Автор


✨ Question of the day ✨: Do you have any other question or doubt about Composite Actions vs Reusable Workflows?



SUPPORT THE CHANNEL :

CoderDave
Автор

There is a difference regarding to the runner. Composite actions will always run in the same runner as the last step. Reusable workflows can run in a different runner instance if you are balancing the jobs. This difference is important if you are using files generated for the previous step. With workflows you need to pass than as artifacts.

joaoleonardolemos
Автор

3:22 so cute! ahah
Thanks for these, I learned gh-actions in a few hours thanks to this channel, already doing "advanced" compositions

workflowinmind
Автор

Let me list what you got wrong, or GH changed:
1) Resuable Workflows CAN CALL other re-usable workflows, down to 4 nested levels.
2) Reusable Workflow CAN use Secrets easily without having to specifically pass them. Just add the "secrets: inherit" in the caller workflow, and then the called workflow can use secrets as normal.
3) Composite Action steps CAN use IF Conditionals.
4) Actions do NOT need their own repository. I just put all my actions in one single repo and reference them as normal.
5) Nothing wrong with this. Jobs cannot be used in Composite Actions.
6) This is true and very annoying. Nothing wrong with this difference.

Antebios
Автор

What a shame that reusable workflows can't be nested. That seems to be the only drawback, but imo it's a big one.

EighthDayPerlman