You can update all the way to Mojave if you want.
But...I wouldn't take a 2012 Mini "that far".
I'd use either Low Sierra or High Sierra instead. My 2012 Mini currently uses Low Sierra, and will remain that way for as long as it runs. Still runs fine.
I'll suggest this to you.
First, try this link to get a copy of Low Sierra. It should download into your applications folder. If the installer tries to run, DON'T run it yet -- just quit it for now.
https://itunes.apple.com/us/app/macos-sierra/id1127487414?ls=1&mt=12
Next, you need a USB flashdrive. I think 8gb will do, but I'd suggest 16gb or larger.
Erase the flash drive to "Mac OS extended with journaling enabled, GUID partition format".
Now, you need a copy of DiskMaker X.
The correct copy to use for Low Sierra can be had by clicking this URL:
http://diskmakerx.com/downloads/DiskMaker_X_6rc5.dmg
Now you can use DiskMaker X to create a bootable flash drive with a few clicks of the mouse.
Once you have this flash drive ready to go, do this:
a. power down the mac, all the way off
b. insert flash drive into USB port
c. press power on button
d. IMMEDIATELY hold down the option key and KEEP HOLDING IT DOWN until the startup manager appears
e. select the flash drive with the pointer and hit return
f. you should boot into the flash drive OS installer
g. "aim" the installer at your internal drive and let it go
h. BE PATIENT. There may be one or more restarts. When done, you should see the Low Sierra login display.