B S D In terms of your tag gentile-on-shabbos how can we know he is a gentile?
An example might be: “A gentile employee of a hotel heats water for coffee on Shabbos, can a Jew use the hot water on Shabbos?”
Suppose such a situation occurs. Maybe he only looks like a gentile. Maybe he is a non-observant Jew and told them he is a gentile because they don’t hire Jews.
OR Maybe his mother is Jewish and his father is non-Jewish and he doesn’t know halakha and thinks he is not a Jew.
We can assume that a person that says that he is a gentile, that it is true because most people in the country are gentiles, and we can go according to the “roiv” ( majority).