Do metals react with ammonia gas (not liquid phase)? In my chemistry notes I have two chemical equations as follows:

$$
\begin{align}
\ce{2 NH3(g) + 6 Li(s) &amp;-&gt; 2 Li3N(s) + 3 H2(g)}\tag{R1} \\
\ce{2 NH3(g) + 2 Na(s) &amp;-&gt; 2 NaNH2 + H2(g)}\tag{R2}
\end{align}
$$

Before digging into the reasons for different products in two equations, when I searched in the internet to find the clear picture of what are the metals (like alkali metals, alkaline earth metals, transition metals) that can react with ammonia in gaseous form, I could only find metals dissolving in liquid ammonia.

I would be grateful if someone could tell that metals don't react with gaseous ammonia, or, if it reacts, what are the metals those react with gaseous ammonia? And are there any conditions needed for the reaction (like heat)?
Wikipedia reports that magnesium nitride can be prepared:

By passing dry nitrogen over heated magnesium:
${\displaystyle{\begin{matrix}{}\\{\ce {{3Mg} + N2-&gt;[{\ce{800^{\circ }C}}]Mg3N2}}\\{}\end{matrix}}}$
or ammonia:
${\displaystyle{\begin{matrix}{}\\{\ce{{3Mg} + 2NH3-&gt;[{\ce{700^{\circ }C}}]{Mg3N2} + 3H2}}\\{}\end{matrix}}}$

No references are cited.