Skip to content

Commit

Permalink
Fix: use jq to decode JSON response
Browse files Browse the repository at this point in the history
  • Loading branch information
Loyalsoldier committed Apr 12, 2021
1 parent 638b6ea commit 4d02c88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Get tag to build
id: tag
run: |
latest_tag=$(curl -sSL --retry 5 "https://api.github.com/repos/v2fly/v2ray-core/releases/latest" | grep "tag_name" | awk -F '"' '{print $4}')
latest_tag=$(curl -sSL --retry 5 "https://api.github.com/repos/v2fly/v2ray-core/releases/latest" | jq .tag_name | awk -F '"' '{print $2}')
if [[ -z "${{ github.event.inputs.tag }}" ]]; then
echo "Use the latest release tag of v2ray-core: ${latest_tag}"
echo ::set-output name=tag::${latest_tag}
Expand Down

0 comments on commit 4d02c88

Please sign in to comment.