From 4309ef3db73c08862a74fc47faaa83c28ebe215e Mon Sep 17 00:00:00 2001 From: ange Date: Sat, 1 Feb 2025 12:40:37 +0000 Subject: [PATCH] fix: WORKFLOWRUNID --- entrypoint.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 11b511f..af8a664 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -27,18 +27,9 @@ #done -function get_ids_from_token() { - local ids - - mapfile -t ids \ - < <(jq -Rr 'split(".")[1] | @base64d | fromjson | .scp | split(":")' <<< "$ACTIONS_RUNTIME_TOKEN") - - WORKFLOWRUNID="${ids[2]}" - WORKFLOWJOBRUNID="${ids[3]}" -} - [ -n "$INPUT_RETENTION_DAYS" ] && RETENTION=", \"retention_days\": $INPUT_RETENTION_DAYS" -get_ids_from_token +IFS=: read -r _ WORKFLOWRUNID WORKFLOWJOBRUNID \ + < <(jq -Rr 'split(".")[1] | @base64d | fromjson | .scp' <<< "$ACTIONS_RUNTIME_TOKEN")