Skip to content

Commit

Permalink
Merge pull request #6 from nolar/fix-jq-prerelease
Browse files Browse the repository at this point in the history
Obey redirections in GitHub API
  • Loading branch information
nolar authored Dec 3, 2020
2 parents 596a920 + 1115655 commit 8c1a637
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ fi

# Fetch all K3s versions usable for the specified partial version.
# Even if the version is specific and complete, assume it is possibly partial.
curl --silent --fail "${authz[@]}" "${GITHUB_API_URL}/repos/${REPO}/releases?per_page=999" |
url="${GITHUB_API_URL}/repos/${REPO}/releases?per_page=999"
curl --silent --fail --location "${authz[@]}" "$url" | \
jq '.[] | select(.prerelease==false) | .tag_name' >/tmp/versions.txt

echo "::group::All available K3s versions (unsorted)"
Expand Down

0 comments on commit 8c1a637

Please sign in to comment.