From 6d8d30b32324d9adb33765edbae2b3df508eda92 Mon Sep 17 00:00:00 2001 From: manuelpett <manuel.petit@inria.fr> Date: Tue, 14 Jan 2025 21:54:27 +0100 Subject: [PATCH] Add Content-Type header to file upload in CI pipeline The "Content-Type: application/zip" header was added to the curl command in the GitLab CI pipeline. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 821146e..67051d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -115,7 +115,7 @@ create_release: script: - echo "Creating release and attaching tutorials.zip..." - echo "Using tag $CI_COMMIT_REF_NAME" - - 'curl --header "PRIVATE-TOKEN: $CI_JOB_TOKEN" --upload-file tutorials.zip "$CI_API_V4_URL/projects/$CI_PROJECT_ID/uploads" > upload_response.json' + - 'curl --header "PRIVATE-TOKEN: $CI_JOB_TOKEN" -header "Content-Type: application/zip" --upload-file tutorials.zip "$CI_API_V4_URL/projects/$CI_PROJECT_ID/uploads" > upload_response.json' - cat upload_response.json - 'UPLOAD_URL=$(jq -r ".url" upload_response.json)' - 'if [ -z "$UPLOAD_URL" ] || [ "$UPLOAD_URL" = "null" ]; then echo "Error: Unable to extract upload URL!" && cat upload_response.json && exit 1; fi' -- GitLab