latest tag if no tag exists
chenele opened this issue · 1 comments
chenele commented
Hi
Based on the documentation it seems we can use this action even in repo which doesnt yet have any tags exist.
when using it like the following:
- name: Get Latest Tag
uses: actions-ecosystem/action-get-latest-tag@v1
with:
with_initial_version: true # although default
initial_version: '1.0.0'
id: get-latest-tag
this step failed with fatal: No names found, cannot describe anything and does not returns the initial_version as the tag...
what am i missing here?
sbx0r commented
that's because action is not supressing error if no tags found on repository.
In case of default settings semver_only
is set to false
.
as a workaround you can set semver_only
to true and it will work.
https://github.com/actions-ecosystem/action-get-latest-tag/blob/main/entrypoint.sh#L13
I oppened pull request to fix that