GitHub Action to find latest tag of any Git repository available on the Internet.
steps:
- uses: tdemin/find-latest-tag@v1
with:
repo: https://github.com/tdemin/gmnhg.git
# v0.4.0
- uses: tdemin@find-latest-tag@v1
with:
repo: https://github.com/golang/go.git
tag: '^go1'
# go1.17.1repo: required, Git URI of a remote to check tags from.tag: optional, regex to check tag names against (default"").
Private repository authentication is currently not implemented, although you can
use the http://user:[email protected]/repo.git URI notation for Git over
HTTP(S).
tag:${{ steps.STEP_NAME.outputs.tag }}
This action will fail if any of the conditions are met:
- Git is unable to
ls-remotethe repository; - there are no tags in the repository;
- no tags are selected by the
tagregular expression.
Tags are sorted with sort -V. This has a few noticeable pitfalls:
1.2goes before1.2.5;v1.2goes before1.2.