The Mechanical Alignment is the "Internal" Alignment
The extremely simplistic rules in Pathfinder/D&D are hardly apt at describing complicated social situations, and they are better applied to issues like the mechanics of certain spells which take input and get output.
Mechanically, a creature can only hold one alignment, which is the "internal" alignment mentioned in the question.
A creature's general moral and personal attitudes are represented by its alignment: lawful good, neutral good, chaotic good, lawful neutral, neutral, chaotic neutral, lawful evil, neutral evil, or chaotic evil.
Each alignment has a list of philosophies or doctrines that characters may follow, together with a list of core concepts to bear in mind while playing a character of a given alignment. You could decide that one word is particularly crucial to your character—be that justice, greed, or self.
The Mechanical Alignment used to determine the outcomes of magic like Detect Evil. In the situation you present, Detect Evil would always reveal the character as Evil because it senses the character's true intentions and is not baffled by social interactions.
You can sense the presence of evil. The amount of information revealed depends on how long you study a particular area or subject.
1st Round: Presence or absence of evil.
2nd Round: Number of evil auras (creatures, objects, or spells) in the area and the power of the most potent evil aura present.
If you are of good alignment, and the strongest evil aura’s power is overwhelming (see below), and the HD or level of the aura’s source is at least twice your character level, you are stunned for 1 round and the spell ends.
3rd Round: The power and location of each aura. If an aura is outside your line of sight, then you discern its direction but not its exact location.
This is the Alignment you put on your character sheet. Not what people see, but what it is mechanically.
Socially, however, it's much more complicated. Some people would see the Tiefling feeding the Hungry and think, "Oh, what a nice person." They think they're Good.
Some people would see them and be suspicious, either through preexisting biases or because they notice something "off." This is where a Check comes in, typically Performance or Deception versus the other party's Insight.
However, in either case, this does not affect what is on the Character Sheet, and does not affect Detect Evil.
Pretending to be Good in order to be Evil does not change the fact that, in Pathfinder at least, you are still Evil, unless your character radically and fundamentally shifts the way that they think over the experience and stops "Pretending," which is something that you should resolve with your GM.