Skip to content

Commit

Permalink
Merge pull request #6 from creative-commoners/pulls/1.0/fix-jq-select
Browse files Browse the repository at this point in the history
FIX Correctly substitute variable in jq select
  • Loading branch information
emteknetnz authored Jun 15, 2022
2 parents caeb075 + 47b29ac commit df2206e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ runs:
FOUND="true"
# Check there are any tags so we can use jq array selector later
if [[ $(jq 'map(type)' __response.json) =~ object ]]; then
if [[ $(jq '.[] | select(.ref == "refs/tags/$TAG")' __response.json) == "" ]]; then
EXISTING_TAG=$(jq ".[] | select(.ref == \"refs/tags/$TAG\")" __response.json)
if [[ $EXISTING_TAG == "" ]]; then
FOUND="false"
fi
fi
Expand Down

0 comments on commit df2206e

Please sign in to comment.