4

Since the documentation for GitHub actions is far far behind, I couldn't find anything about it online.

Is there a way for GitHub actions to select the latest tagged version?

If I want to select a version I would do:

  uses: MarvinJWendt/run-node-formatter@1.2.0

If I always want the latest commit I would use the master branch

  uses: MarvinJWendt/run-node-formatter@master

But what do I have to do, to get the latest tagged version, as the master branch is in development and not stable?

MarvinJWendt
  • 2,357
  • 1
  • 10
  • 36

1 Answers1

3

If there is no way to run a git describe --tags (in order to get the latest tag), one workaround would be:

  • each time you apply a tag, you reset a dedicate "tags" branch to that tag
  • in your GitHub Action workflow, you would "use" the "tags" branch, which by its construction, would reference the latest tag.
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Yes that's a nice workaround, but it's kinda too much effort to maintain. I'm hoping on something like `@latest` to be introduced in the future :) – MarvinJWendt Sep 07 '19 at 16:37
  • @MarvinJWendt I agree. This is just pending that future evolution. – VonC Sep 07 '19 at 16:44