I've seen various people do this sort of thing with success. One person made retaining walls for their terraces with logs stacked on top of each other. She used wooden stakes (bamboo would also work) to hold up the exterior of the wall.
https://www.tenthacrefarm.com/2014/10/heres-a-quick-way-to-terrace-a-hill/
I also remember Kai did a similar thing on Evan's Ant Village plot. Here's hopefully a link to the post about it:
https://permies.com/t/400/45960/evan-ant-village-log#405371
Here's another person who made walls out of log for a very raised garden bed. She talks about the pros and cons here:
http://joybileefarm.com/hugelkultur-bed-improved/
I wouldn't use the willow for the wall, unless it's been dead for a LONG time, as supposedly willows love to sprout, and you'd likely soon have willows all around your garden bed. The pine should work fine, though!
One suggestion I would make would be to make sure that the stakes you use are hammered deep into the ground--at least 2 feet. I actually tried to make a retaining wall this way for one of my garden beds, using bamboo as stakes. Since I wasn't able to drive them deep enough into the ground, they wall started falling outward. Also, fill your garden bed up to the wall as you build the wall, rather than building the wall first and then filling the bed with dirt (otherwise the logs will fall inward). Another tip would be to remove the bark from your logs, if you want them to take longer to decompose.
I hope that helps!