In the suttas we find the four types of kamma:
- There are dark deeds with dark results;
- bright deeds with bright results;
- dark and bright deeds with dark and bright results; and
- neither dark nor bright deeds with neither dark nor bright results, which lead to the ending of deeds. - AN 4.233
The second of these leads to heavenly rebirth:
And what are bright deeds with bright results? It’s when someone makes pleasing choices by way of body, speech, and mind. Having made these choices, they’re reborn in a pleasing world, where pleasing contacts touch them. Touched by pleasing contacts, they experience pleasing feelings that are exclusively happy—like the gods replete with glory. These are called bright deeds with bright results. AN 4.233
and they are characterised as in accordance with the 5 precepts:
And what are bright deeds with bright results? It’s when someone doesn’t kill living creatures, steal, commit sexual misconduct, lie, or use alcoholic drinks that cause negligence. These are called bright deeds with bright results. AN 4.235
So, we might generally say that following the five precepts is bright kamma which leads to rebirth in heavenly realms.
Now, the last of these four types of kamma is synonymous with the noble eightfold path:
And what are neither dark nor bright deeds with neither dark nor bright results, which lead to the ending of deeds? It’s the intention to give up dark deeds with dark results, bright deeds with bright results, and both dark and bright deeds with both dark and bright results. These are called neither dark nor bright deeds with neither dark nor bright results, which lead to the ending of deeds. AN 4.233
So if I’m doing an good action (for example gentle speech), how do I determine if I’m following the eightfold noble path leading to the end of deeds or if I’m setting myself up for rebirth in a heavenly realm and continued samsara?
I have found what might be a partial answer in this thread where @Akaliko and @Viveka discuss AN 7.52
In this sutta we have someone giving a gift accompanied by various thoughts. All of the thoughts lead to rebirth in the company of the gods of the Four Great Kings and continued samsara:
“Sāriputta, someone who gives a gift as an investment, when their body breaks up, after death, is reborn in the company of the gods of the Four Great Kings. When that deed, success, fame, and sovereignty is spent they return to this state of existence.
except for the last where the gift is given
thinking, ‘This is an adornment and requisite for the mind.’
and then it states:
“Sāriputta, someone who gives gifts, not for any other reason, but thinking, ‘This is an adornment and requisite for the mind’, when their body breaks up, after death, is reborn among the gods of Brahmā’s Host. When that deed, success, fame, and sovereignty is spent they are a non-returner; they do not return to this state of existence.
So is this the complete answer? i.e. you can differentiate a ‘neither dark nor bright deed’ from a ‘bright deed’ because you exclusively think of it as an adornment of the mind in the former case, or are there other ways to differentiate between the two in the EBT’s? Does it depend on the deed, as to what the accompanying thought might be to transform the deed into a ‘neither dark nor bright deed’? Are there further examples like AN 7.52 that make this explicit in the EBTs?