My job is, as stated officially, to serve the government of the day. I like this phrasing not only because it unambiguously outlines the duty, but because that "...of the day" finishes it off with a clap on the back that whatever you think about this government, there'll be another one along next. Reassuring sometimes. Disappointing at others. Still, though - you serve the government you've got.
So here lies the problem. Because I would like to think that I am a person of conviction, and a person who wants to change the world for the better, and I would like to think that working for the greater good in public service is a way to do that. And yet... well, many governments ago, the government cheerfully upheld the institution of slavery. Colonised countries. Starved the poor. Killed, injured, imprisoned. Upheld systems of power and control which relied upon the grinding and unrelenting exploitation of the bodies and souls of fellow humans. And while we'd all hope that things are better these days, I am under no illusion whatsoever that some future generation is going to look back on some of the decisions made by today/yesterday/tomorrow's governments and be somewhat less than pleased.
Plus, governments change. So if you're going to work in this job long-term, and you have any kind of political principles of your own, you will almost inevitably end up working for a government you personally wouldn't vote for, to implement policies you personally think are a bad idea.
So. Is this the kind of job someone can ethically do?
I think so.
I think that a politically neutral civil service is important and valuable to our democracy. Given that, I'd be a hypocrite to say that it's wrong to be part of one. Given that, I'd be outright ridiculous to say that me and my beliefs are too special to be sullied, so other people should do it for me instead.
I think that democracy itself is important, and that a legitimately elected government deserves to have the structures of government working to support it. If I'm fine with elections, but think that the people who actually make the government's work possible should collectively throw down their tools and strop off when the 'wrong' side wins, I'm not actually supporting democracy.
I think that getting to write "this policy is a horrendous idea" on Twitter is fine, as far as it goes, but getting to say "Minister, we think this policy is ill-advised for the following reasons..." when you're the people whose advice they're actually meant to listen to has its own kind of value. (And maybe they'll still do it, but again... democracy. I don't want to be part of a system where the elected representatives can be overridden by unelected officials who Know Better on things like policy ideas.)
I think that the political party which would do everything I'd want to do a) does not exist and b) would not get into power if it did. Maybe ten thousand years in the future. But in the meantime, the work of the government has a real and massive effect on the lives of millions of people, every day. I might not be able to make that work done the way I would ideally like it to be, but I can do my best to do it as well as is possible, for as many as possible, in the world we have.