fix: WORKFLOWRUNID
This commit is contained in:
parent
d96a758deb
commit
4309ef3db7
@ -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")
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user