diff --git a/entrypoint.sh b/entrypoint.sh index 78f9001..f95fe3b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,18 +1,31 @@ #!/bin/bash -e -API="$GITHUB_SERVER_URL/api/actions_pipeline/_apis/pipelines/workflows/$GITHUB_RUN_ID/artifacts" +# https://github.com/go-gitea/gitea/blob/47bf8363102b95a240fc6a571d608567ff6b212a/routers/api/actions/artifacts.go + CURL=(curl -H "Authorization: Bearer $ACTIONS_RUNTIME_TOKEN") -UPLOAD_URL="$("${CURL[@]}" --data "{\"Type\":\"actions_storage\",\"Name\":\"$INPUT_NAME\"}" "$API" | jq -r '.fileContainerResourceUrl')" +API="$GITHUB_SERVER_URL/api/actions_pipeline/_apis/pipelines/workflows/$GITHUB_RUN_ID/artifacts?api-version=6.0-preview" + +JSON="$(cat <