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
This commit is contained in:
Jalil David Salamé Messina 2024-12-18 14:35:01 +01:00
parent 89fd1ffa71
commit 34d976f6c5
Signed by: jalil
GPG key ID: F016B9E770737A0B

View file

@ -72,7 +72,10 @@ runs:
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/tasks" \ "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/tasks" \
-H "Authorization: token $GITHUB_TOKEN" \ -H "Authorization: token $GITHUB_TOKEN" \
-H 'accept: application/json' | -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 <RUN_URL> # USAGE: has_report <RUN_URL>
has_report() { has_report() {