Closed cam-rod closed 1 year ago
you could make the suffix of the base image (centos7
& ubi9
) a dist
ARG to continue to use a single Dockerfile with the base image being eclipse-temurin:${jdk}-{dist}
Then in the github action, you only need to associate the jdk versions with the dist (eg using env var):
11, 17, 19
-> centos7
20
-> ubi9
You should have a look at https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude to replace:
strategy:
matrix:
jdk-version: [11, 17]
with:
strategy:
matrix:
include:
- jdk-version: 11
dist: centos7
- jdk-version: 17
dist: centos7
- jdk-version: 20
dist: ubi9
(I've not tested it)
made the suggested changes, let me know what you think
@cam-rod thanks
Closes #175.