Nov 11, 2021
Hi Bruno, thanks :)
You're right the compilation here is done twice (or even more if we count parallel jobs) ad it could be done better to make workflow quicker.
To achieve it you can pass an outcome of the first compilation to another job by using GitHub Actions artifacts, as explained here - https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts#passing-data-between-jobs-in-a-workflow
Only remember to make sure that a compiler and than JVM in a Docker container are from the same provider (OpenJDK, GraalVM, etc.)