Replies: 4 comments 3 replies
-
Considering that you call reusable workflows in another repository by ref, using tags seems natural (just like for custom actions). Possibly major version branches, with the same caveats as for actions. |
Beta Was this translation helpful? Give feedback.
-
Any suggestions from @github-staff ? |
Beta Was this translation helpful? Give feedback.
-
Hey @github-staff, is there recommended best practices we could follow for versioning reusable workflows? My use-case is similar to @nascit above - a single repository storing my orgs reusable workflows, but having the ability to version them each individually, which in turn allows me to use Dependabot to trigger updates for consumers of those workflows when they're updated. Having a repo per workflow seems like overkill. I also like the idea of a central repository so that I can drive at documentation which is generated from its contents. |
Beta Was this translation helpful? Give feedback.
-
Properly versioning reusable workflows is essential for maintaining stability, compatibility, and ease of management in your CI/CD pipelines. Here’s how to do it effectively: 1. Adopt Semantic VersioningMajor Version: Increase for breaking changes or incompatible updates. 2. Tag Your ReleasesUse Git tags to mark specific versions of your workflow files. This creates a clear reference point for each version. git tag -a v1.0.0 -m "Initial release of reusable workflow" 3. Include Version Information in Workflow FilesDocument the version directly in the workflow YAML file to ensure clarity. Add a version key or include version information in comments. name: My Reusable Workflow 4. Maintain a ChangelogDocument changes and updates in a changelog to provide transparency about modifications and their impacts. Fixed
5. Deprecate Older Versions ThoughtfullyClearly communicate deprecation of older versions and provide guidance on transitioning to new versions. 6. Reference Versions ExplicitlyWhen using a reusable workflow, specify the version tag to ensure consistency and avoid unintentional updates. |
Beta Was this translation helpful? Give feedback.
-
One of the big advantages I see on the reusable workflows feature is the ability to centralize them all into a single repository. This enables different teams to collaborate and build workflows that can fit different scenarios. However, versioning plays a big importance in this case as I want to make sure new changes in a reusable workflow won't affect my caller workflow.
In this scenario, what approach are teams taking to version specific workflows that belong to a central reusable workflow repository?
Beta Was this translation helpful? Give feedback.
All reactions