Skip to content

Commit

Permalink
v0.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
nalbam committed Dec 28, 2020
1 parent 3f0c86d commit a009b71
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <me@nalbam.com>"
LABEL homepage="https://opspresso.com/"
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.2.5
v0.2.6
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ branding:

runs:
using: docker
image: docker://opspresso/action-version:v0.2.5
image: docker://opspresso/action-version:v0.2.6
6 changes: 4 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a009b71

Please sign in to comment.