From e5033a2db83180abefea100c74a9e5ccc6b2f50d Mon Sep 17 00:00:00 2001 From: ange Date: Sat, 1 Feb 2025 14:22:51 +0000 Subject: [PATCH] fix: $INPUT-S- --- entrypoint.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 70f5a03..4bcbc92 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,11 +1,11 @@ #!/bin/bash -e curl --fail -v -D /dev/stdout -o resp0.json --header "Authorization: Bearer $ACTIONS_RUNTIME_TOKEN" \ - -X POST --data "{\"Type\":\"actions_storage\",\"Name\":\"$INPUTS_NAME\"}" \ + -X POST --data "{\"Type\":\"actions_storage\",\"Name\":\"$INPUT_NAME\"}" \ "$GITHUB_SERVER_URL/api/actions_pipeline/_apis/pipelines/workflows/$GITHUB_RUN_ID/artifacts?api-version=6.0-preview" cat resp0.json UPLOAD_URL=$(jq -r '.fileContainerResourceUrl' resp0.json) -for artifact in $INPUTS_PATH; do +for artifact in $INPUT_PATH; do content_length=$(ls -l "$artifact" | awk '{print $5}') md5=$(openssl md5 -binary "$artifact" | base64) curl --fail -v -D /dev/stdout -o resp1.json --header "Authorization: Bearer $ACTIONS_RUNTIME_TOKEN" \ @@ -13,11 +13,11 @@ for artifact in $INPUTS_PATH; do --header "x-tfs-filelength: ${content_length}" \ --header "content-range: bytes 0-$((content_length-1))/${content_length}" \ -X PUT --data-binary "@$artifact" \ - "${UPLOAD_URL}?retentionDays=$INPUTS_RETENTION_DAYS&itemPath=$INPUTS_NAME%2F$artifact" + "${UPLOAD_URL}?retentionDays=$INPUT_RETENTION_DAYS&itemPath=$INPUT_NAME%2F$artifact" cat resp1.json curl --fail -v -D /dev/stdout -o resp2.json --header "Authorization: Bearer $ACTIONS_RUNTIME_TOKEN" \ -X PATCH \ - "$GITHUB_SERVER_URL/api/actions_pipeline/_apis/pipelines/workflows/$GITHUB_RUN_ID/artifacts?api-version=6.0-preview&artifactName=$INPUTS_NAME" + "$GITHUB_SERVER_URL/api/actions_pipeline/_apis/pipelines/workflows/$GITHUB_RUN_ID/artifacts?api-version=6.0-preview&artifactName=$INPUT_NAME" cat resp2.json rm resp1.json resp2.json done