chore: Replace deprecated command with environment file (#24063)

This commit is contained in:
Jongwoo Han 2024-02-28 00:34:48 +09:00 committed by GitHub
parent 6447cd0e92
commit e817b48ec9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -98,13 +98,13 @@ done
if [ -z "${GITHUB_TAG_NAME}" ]; then if [ -z "${GITHUB_TAG_NAME}" ]; then
echo "Missing tag parameter, usage: ./scripts/tag_latest_release.sh <GITHUB_TAG_NAME>" echo "Missing tag parameter, usage: ./scripts/tag_latest_release.sh <GITHUB_TAG_NAME>"
echo "::set-output name=SKIP_TAG::true" echo "SKIP_TAG=true" >>$GITHUB_OUTPUT
exit 1 exit 1
fi fi
if [ -z "$(git_show_ref)" ]; then if [ -z "$(git_show_ref)" ]; then
echo "The tag ${GITHUB_TAG_NAME} does not exist. Please use a different tag." echo "The tag ${GITHUB_TAG_NAME} does not exist. Please use a different tag."
echo "::set-output name=SKIP_TAG::true" echo "SKIP_TAG=true" >>$GITHUB_OUTPUT
exit 0 exit 0
fi fi
@ -112,7 +112,7 @@ fi
if ! [[ ${GITHUB_TAG_NAME} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] if ! [[ ${GITHUB_TAG_NAME} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]
then then
echo "This tag ${GITHUB_TAG_NAME} is not a valid release version. Not tagging." echo "This tag ${GITHUB_TAG_NAME} is not a valid release version. Not tagging."
echo "::set-output name=SKIP_TAG::true" echo "SKIP_TAG=true" >>$GITHUB_OUTPUT
exit 1 exit 1
fi fi
@ -177,14 +177,14 @@ done
# Determine the result based on the comparison # Determine the result based on the comparison
if [[ -z "$compare_result" ]]; then if [[ -z "$compare_result" ]]; then
echo "Versions are equal" echo "Versions are equal"
echo "::set-output name=SKIP_TAG::true" echo "SKIP_TAG=true" >>$GITHUB_OUTPUT
elif [[ "$compare_result" == "greater" ]]; then elif [[ "$compare_result" == "greater" ]]; then
echo "This release tag ${GITHUB_TAG_NAME} is newer than the latest." echo "This release tag ${GITHUB_TAG_NAME} is newer than the latest."
echo "::set-output name=SKIP_TAG::false" echo "SKIP_TAG=false" >>$GITHUB_OUTPUT
# Add other actions you want to perform for a newer version # Add other actions you want to perform for a newer version
elif [[ "$compare_result" == "lesser" ]]; then elif [[ "$compare_result" == "lesser" ]]; then
echo "This release tag ${GITHUB_TAG_NAME} is older than the latest." echo "This release tag ${GITHUB_TAG_NAME} is older than the latest."
echo "This release tag ${GITHUB_TAG_NAME} is not the latest. Not tagging." echo "This release tag ${GITHUB_TAG_NAME} is not the latest. Not tagging."
# if you've gotten this far, then we don't want to run any tags in the next step # if you've gotten this far, then we don't want to run any tags in the next step
echo "::set-output name=SKIP_TAG::true" echo "SKIP_TAG=true" >>$GITHUB_OUTPUT
fi fi