Skip to content

Commit

Permalink
Fix download URL
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoshidajp committed Oct 30, 2023
1 parent 911623d commit 41ede0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
env:
github_token: ${{ inputs.github-token }}
run: |
set -e
set -ex
VERSION="${{ inputs.version }}"
if [ -n "${{ inputs.version-file }}" ]; then
VERSION="v$(cat ${{ inputs.version-file }})"
Expand All @@ -24,9 +24,9 @@ runs:
api_request_args=("${api_request_args[@]}" -H "authorization: token $github_token")
fi
if [ "${VERSION}" = "latest" ]; then
DOWNLOAD_URL=$(curl "${api_request_args[@]}" https://api.github.com/repos/kyoshidajp/dep-doctor/releases | jq -r '[.[]|select(.tag_name > "v0.2")][0].assets[].browser_download_url|select(match("Linux_arm64."))')
DOWNLOAD_URL=$(curl "${api_request_args[@]}" https://api.github.com/repos/kyoshidajp/dep-doctor/releases | jq -r '[.[]|select(.tag_name > "v0.2")][0].assets[].browser_download_url|select(match("Linux_x86_64."))')
else
DOWNLOAD_URL=https://github.com/kyoshidajp/dep-doctor/releases/download/${VERSION}/dep-doctor_Linux_arm64.tar.gz
DOWNLOAD_URL=https://github.com/kyoshidajp/dep-doctor/releases/download/${VERSION}/dep-doctor_Linux_x86_64.tar.gz
fi
mkdir -p ${RUNNER_TOOL_CACHE}/dep-doctor
cd /tmp
Expand Down

0 comments on commit 41ede0a

Please sign in to comment.