File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -56,15 +56,16 @@ runs:
56
56
URL="${{ steps.prepare.outputs.uploadApiEndpoint }}"
57
57
IDTOKEN="${{ steps.prepare.outputs.idtoken }}"
58
58
VERBOSE="${{ inputs.verbose }}"
59
+ UPLOAD_DIR="${{ inputs.site-dir }}"
59
60
60
61
[[ "$VERBOSE" == "true" ]] && CURL_OPTS="-v" || CURL_OPTS="--silent"
61
62
62
63
# Build curl arguments for multipart/form-data, preserving relative paths
63
64
CURL_ARGS=()
64
65
while IFS= read -r -d '' file; do
65
- relpath="${file#${{ inputs.dir }}}"
66
+ relpath="${file#$UPLOAD_DIR}" # Remove the base directory from the path
66
67
CURL_ARGS+=("-F" "files[${relpath}]=@${file}")
67
- done < <(find ${{ inputs.dir }} -type f -print0)
68
+ done < <(find $UPLOAD_DIR -type f -print0)
68
69
69
70
FILE_COUNT="${#CURL_ARGS[@]}"
70
71
echo "Uploading $FILE_COUNT files to $URL..."
You can’t perform that action at this time.
0 commit comments