こんにちは。
*わかりやすくするために、example を少し変えました。6/3
主要なことを述べたあとで、それに関連あることを付け加えるときに使います。
You use "ちなみに" to add some extra info which is related to the main subject after talking about the main subject. It means like "I'll give you some extra info for reference."
example)
Aさん:土曜日は晴れると思いますか?
Bさん:土曜日は晴れると思います。ちなみに、日曜日も晴れだそうです。
Bさん added the extra info about Sunday's weather after he mentioned about Saturday's one, while Aさん asked him only about Saturday. Bさん must've thought 日曜日の天気予報 would be helps Aさん to guess 土曜日の天気。
This expression, ちなみに, can't be used to express an additional action.
In such cases, you use ”ついでに” shuさん gave you.
× : 買い物に出かけました。ちなみに友達のところへ寄りました。
○ : 買い物に出かけました。ついでに友達のところへ寄りました。
Hope it helps you. :-)