From 79ceba6662abcf9310594b744184f026d2e0d363 Mon Sep 17 00:00:00 2001 From: James Cooke Date: Fri, 11 Feb 2022 16:14:33 +0000 Subject: [PATCH] fix: Tweak to use `/latest` endpoint (#12) --- action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 4f6a124..653f0ac 100644 --- a/action.yml +++ b/action.yml @@ -30,10 +30,10 @@ runs: owner="${{ inputs.owner }}" repo="${{ inputs.repo }}" - release_json=$(curl https://api.github.com/repos/$owner/$repo/releases) - latest_tag=$(echo "$release_json" | jq -r '.[0].tag_name') - latest_tag_published_at=$(echo "$release_json" | jq -r '.[0].published_at') - target_commitish=$(echo "$release_json" | jq -r '.[0].target_commitish') + release_json=$(curl https://api.github.com/repos/$owner/$repo/releases/latest) + latest_tag=$(echo "$release_json" | jq -r '.tag_name') + latest_tag_published_at=$(echo "$release_json" | jq -r '.published_at') + target_commitish=$(echo "$release_json" | jq -r '.target_commitish') echo "latest_tag: $latest_tag" echo "latest_tag_published_at: $latest_tag_published_at"