From b75bbea8d9f7033caf675c18867b2c99d6e34438 Mon Sep 17 00:00:00 2001 From: Chris Cureau Date: Fri, 10 Mar 2023 08:50:21 -0600 Subject: [PATCH] quiet warnings, use GITHUB_OUTPUT --- entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index d139660..e2b02e4 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