From a009b7168d9b98cf865b178a099c3c9a9c98c547 Mon Sep 17 00:00:00 2001 From: nalbam Date: Mon, 28 Dec 2020 21:11:48 +0900 Subject: [PATCH] v0.2.6 --- Dockerfile | 2 +- VERSION | 2 +- action.yml | 2 +- entrypoint.sh | 6 ++++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 393148e..2108d31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ LABEL "com.github.actions.description"="Increase the patch version." LABEL "com.github.actions.icon"="tag" LABEL "com.github.actions.color"="blue" -LABEL version=v0.2.5 +LABEL version=v0.2.6 LABEL repository="https://github.com/opspresso/action-version" LABEL maintainer="Jungyoul Yu " LABEL homepage="https://opspresso.com/" diff --git a/VERSION b/VERSION index b88fb90..400feeb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.2.5 +v0.2.6 diff --git a/action.yml b/action.yml index f1b1f28..68046fb 100644 --- a/action.yml +++ b/action.yml @@ -8,4 +8,4 @@ branding: runs: using: docker - image: docker://opspresso/action-version:v0.2.5 + image: docker://opspresso/action-version:v0.2.6 diff --git a/entrypoint.sh b/entrypoint.sh index e4c9c9e..97ac25e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -26,9 +26,11 @@ _version() { VERSION="${MAJOR}.${MINOR}.${PATCH}" printf "${VERSION}" > ./VERSION else - # latest versions + AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}" + URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/releases" - VERSION=$(curl -s ${URL} | jq -r '.[] | .tag_name' | grep "${MAJOR}.${MINOR}." | cut -d'-' -f1 | sort -Vr | head -1) + + VERSION=$(curl -sSL -H \"${AUTH_HEADER}\" ${URL} | jq -r '.[] | .tag_name' | grep "${MAJOR}.${MINOR}." | cut -d'-' -f1 | sort -Vr | head -1) if [ -z ${VERSION} ]; then VERSION="${MAJOR}.${MINOR}.0"