Hi,
Are you asking specifically how to configure your GH Actions script? I.e. what syntax? Or are you asking for strategy? Because the latter is easier for me.
Your options are
-
operate exclusively with Java 11, but compile to Java 8. The first search result gives the syntax for that
-
compile with Java 8, then analyze with Java 11, explicitly excluding the compile step. The
sonar
task depends oncompile
, so it will invoke it by default if you don’t.
HTH,
Ann