From 34d976f6c5599d9bde6d49af809e7025b20c3fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Wed, 18 Dec 2024 14:35:01 +0100 Subject: [PATCH] fix(action): invalid quoting of JSON Pass arguments as `--arg name value` instead of trying to interpolate the string. Why did I forget to do this? T-T --- action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 86efef0..3260be1 100644 --- a/action.yml +++ b/action.yml @@ -72,7 +72,10 @@ runs: "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/tasks" \ -H "Authorization: token $GITHUB_TOKEN" \ -H 'accept: application/json' | - jq --raw-output '[.workflow_runs[] | select(.name == '"$JOB_NAME"' and .head_branch == '"$HEAD_BRANCH"')] | first | .url' + jq --raw-output \ + --arg name "$JOB_NAME" \ + --arg head_branch "$HEAD_BRANCH" \ + '[.workflow_runs[] | select(.name == $name and .head_branch == $head_branch)] | first | .url' } # USAGE: has_report has_report() { -- 2.47.0