From 890238ef9cc4470a3f0ba616f1e68b50efe64210 Mon Sep 17 00:00:00 2001 From: colbynh Date: Wed, 17 Apr 2024 12:48:23 -0400 Subject: [PATCH 1/3] Fix warnings --- entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index d139660..6e26821 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,7 +6,7 @@ git config --global --add safe.directory /github/workspace git fetch --tags # This suppress an error occurred when the repository is a complete one. -git fetch --prune --unshallow || true +git fetch --prune --unshallow 2>/dev/null || true latest_tag='' @@ -18,7 +18,7 @@ else # Get a latest tag in the shape of semver. for ref in $(git for-each-ref --sort=-creatordate --format '%(refname)' refs/tags); do tag="${ref#refs/tags/}" - if echo "${tag}" | grep -Eq '^v?([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$'; then + if echo "${tag}" | grep -Eq '^v?([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$' 2>/dev/null; then latest_tag="${tag}" break fi @@ -29,4 +29,4 @@ if [ "${latest_tag}" = '' ] && [ "${INPUT_WITH_INITIAL_VERSION}" = 'true' ]; the latest_tag="${INPUT_INITIAL_VERSION}" fi -echo "::set-output name=tag::${latest_tag}" +echo "tag=${latest_tag}" >>$GITHUB_OUTPUT \ No newline at end of file From 971f7f3589ced423dae323383de5f6e6e180772a Mon Sep 17 00:00:00 2001 From: colbynh Date: Wed, 17 Apr 2024 12:49:55 -0400 Subject: [PATCH 2/3] Update readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3174f87..6168693 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Action Get Latest Tag +Forked from https://github.com/actions-ecosystem/action-get-latest-tag [![actions-workflow-lint][actions-workflow-lint-badge]][actions-workflow-lint] [![release][release-badge]][release] From 8b1158bd9f2014ee8b4f39f351ec7b2ccfdf44fb Mon Sep 17 00:00:00 2001 From: colbynh Date: Wed, 17 Apr 2024 13:00:49 -0400 Subject: [PATCH 3/3] Formatting --- README.md | 2 +- entrypoint.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6168693..d5ce57e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Action Get Latest Tag -Forked from https://github.com/actions-ecosystem/action-get-latest-tag +Forked from https://github.com/actions-ecosystem/action-get-latest-tag. [![actions-workflow-lint][actions-workflow-lint-badge]][actions-workflow-lint] [![release][release-badge]][release] diff --git a/entrypoint.sh b/entrypoint.sh index 6e26821..a9d7cca 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -29,4 +29,4 @@ if [ "${latest_tag}" = '' ] && [ "${INPUT_WITH_INITIAL_VERSION}" = 'true' ]; the latest_tag="${INPUT_INITIAL_VERSION}" fi -echo "tag=${latest_tag}" >>$GITHUB_OUTPUT \ No newline at end of file +echo "tag=${latest_tag}" >> "$GITHUB_OUTPUT" \ No newline at end of file