Custom Action : unable to find version #39519
-
Select Topic AreaQuestion BodyHi I don't understand anymore how calling version works. I'm pretty sure it worked in the past. I have a custom action with 3 releases
If I call the action by the exact tag number, it works perfectly but if I call it by the major version number (v1), it does not work, same goes for v2 And the workflow can't resolve it: I was expecting that by calling "v2", I would get the last version matching v2, including v2.0.0 What am I missing ? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
There's noting automatic, a version will only work if a ref (tag or branch) of the name exists. Some action repositories have branches (or moving tags) for major versions, some do not. If you want e.g. |
Beta Was this translation helpful? Give feedback.
-
thanks @airtower-luna So if I understand you well, if I want people to always use the very "patch" version (i.e. v2.x), I need to update my "tag v2" to point to the last ref ? This way, they can call myaction@v2 and it would work ? I'm asking because I thought that tags should be immutable but here, the doc says "move the tag version" |
Beta Was this translation helpful? Give feedback.
-
This article is pretty clear: https://dev.to/rob_bos/how-github-actions-versioning-system-works-lec
I think I was misguided because even GitHub does not follow best practices for its actions so I thought it would be implicit |
Beta Was this translation helpful? Give feedback.
-
Agree for the hash version but for instance, when they announced the deprecation of NodeJS12, all actions started generating warning and I had to change around 100 workflows. it could have been transparent if everybody use semver properly :) |
Beta Was this translation helpful? Give feedback.
-
Oh, that's definitely an annoying situation! That's why I mentioned Dependabot, you'd just have to accept the PRs (okay, 100 is still a lot! 😁). And ideally tests would show you if an update might cause trouble before merging. |
Beta Was this translation helpful? Give feedback.
There's noting automatic, a version will only work if a ref (tag or branch) of the name exists. Some action repositories have branches (or moving tags) for major versions, some do not. If you want e.g.
v2
to work, you'll have to create such a ref and make sure it always points to the latestv2.x
release.