Skip to content

Commit

Permalink
Cater for successful 204 code also
Browse files Browse the repository at this point in the history
  • Loading branch information
armstrong-pv committed Feb 24, 2025
1 parent 5f8ab42 commit 7565494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/actions/upload-file-to-web-app/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ runs:
echo "Uploading $SOURCE_FILE to $WEB_APP_NAME..."
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X PUT -u "$KUDU_USER:$KUDU_PASS" -H "If-Match: *" --upload-file "$SOURCE_FILE" "https://$WEB_APP_NAME.scm.azurewebsites.net/api/vfs$TARGET_FILE")
if [ "$HTTP_CODE" -eq 200 ] || [ "$HTTP_CODE" -eq 201 ]; then
if [ "$HTTP_CODE" -eq 200 ] || [ "$HTTP_CODE" -eq 201 ] || [ "$HTTP_CODE" -eq 204 ]; then
echo "$TARGET_FILE successfully uploaded"
else
echo "Unexpected HTTP code $HTTP_CODE returned from upload request - exiting"
Expand Down

0 comments on commit 7565494

Please # to comment.