by ptx · 1y ago · 0 comments
But the GitHub documentation [0] makes it clear that tags for major versions are intended to be mutable and be updated to point to new minor versions as they are released, not because it's "easier to read" but because you "can expect an action's patch version to include necessary critical fixes and security patches, while still remaining compatible with their existing workflows" (as long as the author follows their recommended semantic versioning scheme).
So choosing a major-version tag is GitHub's recommended practice precisely because it is mutable and does change.
[0] https://docs.github.com/en/actions/sharing-automations/creat...
It's two sides of the same coin: on one hand, an update can include fixes for bugs and vulnerabilities; on the other hand, an update can also include new bugs and vulnerabilities (or even malicious code). Updating too quickly can be risky. Updating too slowly can also be risky.
Release branches are typically the mutable reference. So I would create a 'v2' release branch, but not a 'v2' tag which gets updated.
Also, by convention, git references starting with 'v' are typically immutable tags and not branches.
But, even given the above, the git-community at large knows that tags can be mutable, and so if we care about that, we reference the sha (malicious collisions excepted).
[0] https://docs.github.com/en/actions/writing-workflows/workflo...