Did Half Dome in 2011 but was able to plan in advance and got a permit that way. I read that you can get them first thing in the morning for the next day if others don't use theirs, but no guarantees. I Flew out with my brother and then rented a vehicle, camped out of it for about a week, stayed in Yosemite Village in a tent cabin which worked out well, but I don't think you can get one last minute. (FYI, it was the double walled deluxe ones that had the nasty rodent virus-we stayed in a single walled one). There are some backcountry camp sites in the village mostly for those staging to hike in the next day-you may be able to do that.
We hit the trail before 5 am in the dark, and then summited late morning, and were back late afternoon. It's beautiful! You can get campsites first thing in the morning first come first serve, but no guarantees. We backcountry camped outside the park a couple nights, but I would not want to ride bike early morning thru the park-many signs with "bear hit here" alongside the roadway.
Another option would be to get a permit to come in backcountry from Tuolomne Meadows and then you could park the bike one morning, hike in and camp near Half Dome, then hike back out to the bike the next day. These permits are easier to get. Good Luck! Todd