One Trigger with 2 actions 1 with condition

How do I do a trigger with 2 actions. One action always happen and the other one depend on the time.

if door open then play music.
if door open then play music and if the sun below horizon turn on light.

Same trigger for both. I am not sure how to write automation for this. If anyone help would be appreciated. Thanks

Just a simple example:

  - your trigger
  - condition: door open
  - service: play music
  - condition: sun below horizon
  - service: turn on light

To add to what VDRainer said, see here for the relevant documentation that explains how to use conditions in the action block.

Thank you. That example worked.